]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add check-includes test to the test suite
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 5 May 2023 07:35:54 +0000 (09:35 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 9 May 2023 06:11:10 +0000 (08:11 +0200)
Let's just call it always. It is quite fast (meson says 0.12 s).

meson.build

index 1fd22c4f4537b152db385d87f927035b4d358ab4..9c35a701dd46f1a4e75d19b751cc48f20a3c1bd1 100644 (file)
@@ -4738,17 +4738,26 @@ if git.found()
                 run_target(
                         'ctags',
                         command : [env, 'ctags', '--tag-relative=never', '-o', '@0@/tags'.format(project_source_root)] + all_files)
+
+                ############################################
+
+                if want_tests != 'false' and conf.get('BUILD_MODE_DEVELOPER') == 1
+                        test('check-includes',
+                             files('tools/check-includes.py'),
+                             args: all_files,
+                             env : ['PROJECT_SOURCE_ROOT=@0@'.format(project_source_root)])
+                endif
         endif
-endif
 
-if git.found()
+        ####################################################
+
         git_contrib_sh = find_program('tools/git-contrib.sh')
         run_target(
                 'git-contrib',
                 command : [git_contrib_sh])
-endif
 
-if git.found()
+        ####################################################
+
         git_head = run_command(
                 git, '--git-dir=@0@/.git'.format(project_source_root),
                      'rev-parse', 'HEAD',