]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: verify that dbus docs are fresh
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 27 Aug 2020 18:10:01 +0000 (20:10 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 27 Aug 2020 19:30:22 +0000 (21:30 +0200)
This makes use of the developer mode switch: the test is only done
if the user opted-in into developer mode.

Before the man/update-dbus-docs was using the argument form where
we don't need to run find_command(), but that doesn't work with test(),,
so find_command() is used and we get one more line in the config log.

man/meson.build
meson.build

index 3a7143a4b6a7377a71326af8cf80a291e31d0f72..3c2c7023ed08f325a22b3ed50b4cabba367176e4 100644 (file)
@@ -202,11 +202,17 @@ if dbus_docs.length() > 0
         custom_target(
                 'update-dbus-docs',
                 output : 'update-dbus-docs',
-                command : ['python3',
-                           '@0@/tools/update-dbus-docs.py'.format(project_source_root),
+                command : [update_dbus_docs_py,
                            '--build-dir=@0@'.format(project_build_root),
                            '@INPUT@'],
                 input : dbus_docs)
+
+        if conf.get('DEVELOPER_MODE') == 1
+                test('dbus-docs-fresh',
+                     update_dbus_docs_py,
+                     args : ['--build-dir=@0@'.format(project_build_root),
+                             '--test'] + dbus_docs)
+        endif
 endif
 
 ############################################################
index 36ed7a47be1092e214d7bca484da9bb46f2fe544..683754031383d055f6366c357d64a35b2b68dc11 100644 (file)
@@ -1637,6 +1637,7 @@ make_directive_index_py = find_program('tools/make-directive-index.py')
 make_man_index_py = find_program('tools/make-man-index.py')
 syscall_names_update_sh = find_program('tools/syscall-names-update.sh')
 xml_helper_py = find_program('tools/xml_helper.py')
+update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
 
 ############################################################