]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: use conf configuration_data object to generate test-sysusers.sh
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 16 May 2021 13:57:55 +0000 (15:57 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 May 2021 01:24:43 +0000 (10:24 +0900)
I wanted to use jinja2 templating here too, but it's hard to get right:
custom_target() strips the executable bit by default (unlike configure_file
apparently). custom_target() has install_mode setting, but it was only added
in meson-0.47, so it can't be used while we support 0.46. And without the
executable bit the test is not invoked properly. For example, "root-unittests"
in the debian package calls test-* after installation, so the executable bit
there is necessary. It would be possible to adjust the file mode after the
fact, but it would make things more complicated.

So let's use the native meson substitutions here. We don't need anything more
fancy.

test/meson.build

index b1d5bf9a85253367adc90d9b1379905b321612ed..47c7f4d49a51a194ddee2f0e1fb3bbb2539e5f7d 100644 (file)
@@ -65,7 +65,7 @@ hwdb_test_sh = find_program('hwdb-test.sh')
 test_sysusers_sh = configure_file(
         input : 'test-sysusers.sh.in',
         output : 'test-sysusers.sh',
-        configuration : substs)
+        configuration : conf)
 if install_tests and conf.get('ENABLE_SYSUSERS') == 1
         install_data(test_sysusers_sh,
                      install_dir : testsdir)