From f23c031af432b3657c2b021248cd845a0ce3c567 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 10 Mar 2014 11:16:44 -0400 Subject: [PATCH] ui: Drop minimum version to match RHEL7 And add unit test to catch future dependency issues --- tests/misc.py | 24 ++++++++++++++++++++++++ ui/addstorage.ui | 2 +- ui/gfxdetails.ui | 2 +- ui/netlist.ui | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/tests/misc.py b/tests/misc.py index c164d250..1c08afb7 100644 --- a/tests/misc.py +++ b/tests/misc.py @@ -89,3 +89,27 @@ class TestMisc(unittest.TestCase): files += _find_py("virtcli") self._check_modules(files) + + + def test_ui_minimum_version(self): + import glob + import xml.etree.ElementTree as ET + failures = [] + for filename in glob.glob("ui/*.ui"): + root = ET.parse(filename).getroot() + + req = root[0] + if req.tag != "requires": + continue + + if req.attrib.get("lib") != "gtk+": + continue + version = req.attrib["version"] + if (int(version.split(".")[0]) > 3 or + int(version.split(".")[1]) > 8): + failures.append((filename, req.attrib["version"])) + + if failures: + raise AssertionError("The following files require a gtk version " + "higher than our target of gtk-3.8:\n" + + "\n".join([("%s version=%s" % tup) for tup in failures])) diff --git a/ui/addstorage.ui b/ui/addstorage.ui index 2f307a67..425d3459 100644 --- a/ui/addstorage.ui +++ b/ui/addstorage.ui @@ -1,7 +1,7 @@ - + 1000000 0.10000000000000001 diff --git a/ui/gfxdetails.ui b/ui/gfxdetails.ui index e40b61ab..32d18a2b 100644 --- a/ui/gfxdetails.ui +++ b/ui/gfxdetails.ui @@ -1,7 +1,7 @@ - + 5900 50000 diff --git a/ui/netlist.ui b/ui/netlist.ui index d7d09f8b..60324fda 100644 --- a/ui/netlist.ui +++ b/ui/netlist.ui @@ -1,7 +1,7 @@ - + True False