diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-05-06 20:12:17 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-05-06 20:25:16 +0530 |
commit | 26aeef7bf5243b9003648b272b956ff760f21f35 (patch) | |
tree | dc88cc8506a669ee7efdacf15bd18507348c49f2 /run_unittests.py | |
parent | c1f275bfa644beafab9f8572351d4b64d61c148b (diff) | |
download | meson-nirbheek/fix-gtkdoc-content-files-File.tar.gz |
gnome.gdbus_codegen: Fix output file list for docbook custom targetsnirbheek/fix-gtkdoc-content-files-File
We were setting it to a totally wrong name, while the output of gtkdoc
is very predictable.
Also add a test for it, and fix a bug in meson introspect found while
adding the test.
The test will only work with glib 2.56.2, so it will be skipped on the
CI. I ran it manually to verify that it works.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index 78bb9b7b6..94c14dabc 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -688,8 +688,10 @@ class BasePlatformTests(unittest.TestCase): cmds = [l[len(prefix):].split() for l in log if l.startswith(prefix)] return cmds - def introspect(self, arg): - out = subprocess.check_output(self.mintro_command + [arg, self.builddir], + def introspect(self, args): + if isinstance(args, str): + args = [args] + out = subprocess.check_output(self.mintro_command + args + [self.builddir], universal_newlines=True) return json.loads(out) @@ -2938,6 +2940,18 @@ class LinuxlikeTests(BasePlatformTests): gobject_found = True self.assertTrue(glib_found) self.assertTrue(gobject_found) + if subprocess.call(['pkg-config', '--exists', 'glib-2.0 >= 2.56.2']) != 0: + raise unittest.SkipTest('glib >= 2.56.2 needed for the rest') + targets = self.introspect('--targets') + docbook_target = None + for t in targets: + if t['name'] == 'generated-gdbus-docbook': + docbook_target = t + break + self.assertIsInstance(docbook_target, dict) + ifile = self.introspect(['--target-files', 'generated-gdbus-docbook@cus'])[0] + self.assertEqual(t['filename'], 'gdbus/generated-gdbus-doc-' + ifile) + def test_build_rpath(self): if is_cygwin(): |