ui: Drop minimum version to match RHEL7
And add unit test to catch future dependency issues
This commit is contained in:
parent
75349b9cf0
commit
f23c031af4
|
@ -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]))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<requires lib="gtk+" version="3.8"/>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="upper">1000000</property>
|
||||
<property name="step_increment">0.10000000000000001</property>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<requires lib="gtk+" version="3.8"/>
|
||||
<object class="GtkAdjustment" id="adjustment4">
|
||||
<property name="lower">5900</property>
|
||||
<property name="upper">50000</property>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<requires lib="gtk+" version="3.8"/>
|
||||
<object class="GtkGrid" id="net-source-box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
|
Loading…
Reference in New Issue