aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/modules/gnome.py6
-rwxr-xr-xrun_unittests.py18
-rw-r--r--test cases/frameworks/10 gtk-doc/doc/meson.build3
3 files changed, 22 insertions, 5 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index cb12eeb..da72a1f 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -938,9 +938,13 @@ This will become a hard error in the future.''')
docbook_cmd = cmd + ['--output-directory', '@OUTDIR@', '--generate-docbook', docbook, '@INPUT@']
+ # The docbook output is always ${docbook}-${name_of_xml_file}
output = namebase + '-docbook'
+ outputs = []
+ for f in xml_files:
+ outputs.append('{}-{}'.format(docbook, f))
custom_kwargs = {'input': xml_files,
- 'output': output,
+ 'output': outputs,
'command': docbook_cmd,
'build_by_default': build_by_default
}
diff --git a/run_unittests.py b/run_unittests.py
index 78bb9b7..94c14da 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():
diff --git a/test cases/frameworks/10 gtk-doc/doc/meson.build b/test cases/frameworks/10 gtk-doc/doc/meson.build
index 60a494d..9f38eaa 100644
--- a/test cases/frameworks/10 gtk-doc/doc/meson.build
+++ b/test cases/frameworks/10 gtk-doc/doc/meson.build
@@ -5,8 +5,7 @@ version_xml = configure_file(input : 'version.xml.in',
configuration : cdata)
gnome.gtkdoc('foobar',
- version_xml,
src_dir : inc,
main_sgml : 'foobar-docs.sgml',
- content_files : docbook,
+ content_files : [docbook, version_xml],
install : true)