]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
3a726fcd | 2 | |
a18c7865 ZJS |
3 | if install_tests |
4 | testdata_dir = testsdir + '/testdata/' | |
5 | ||
6 | install_subdir('journal-data', | |
7 | install_dir : testdata_dir) | |
8 | install_subdir('units', | |
9 | install_dir : testdata_dir) | |
10 | install_subdir('test-execute', | |
11 | install_dir : testdata_dir) | |
12 | install_subdir('test-path', | |
13 | install_dir : testdata_dir) | |
a6d9111c ZJS |
14 | install_subdir('test-path-util', |
15 | install_dir : testdata_dir) | |
a18c7865 ZJS |
16 | install_subdir('test-umount', |
17 | install_dir : testdata_dir) | |
18 | install_subdir('test-network-generator-conversion', | |
19 | install_dir : testdata_dir) | |
20 | install_subdir('testsuite-04.units', | |
21 | install_dir : testdata_dir) | |
22 | install_subdir('testsuite-06.units', | |
23 | install_dir : testdata_dir) | |
24 | install_subdir('testsuite-10.units', | |
25 | install_dir : testdata_dir) | |
26 | install_subdir('testsuite-11.units', | |
27 | install_dir : testdata_dir) | |
28 | install_subdir('testsuite-16.units', | |
29 | install_dir : testdata_dir) | |
30 | install_subdir('testsuite-28.units', | |
31 | install_dir : testdata_dir) | |
32 | install_subdir('testsuite-30.units', | |
33 | install_dir : testdata_dir) | |
34 | install_subdir('testsuite-52.units', | |
35 | install_dir : testdata_dir) | |
80769cb6 | 36 | |
a18c7865 ZJS |
37 | testsuite08_dir = testdata_dir + '/testsuite-08.units' |
38 | install_data('testsuite-08.units/-.mount', | |
39 | install_dir : testsuite08_dir) | |
40 | install_data('testsuite-08.units/systemd-remount-fs.service', | |
41 | install_dir : testsuite08_dir) | |
42 | meson.add_install_script(meson_make_symlink, | |
43 | './-.mount', | |
44 | testsuite08_dir + '/root.mount') | |
45 | meson.add_install_script(meson_make_symlink, | |
46 | '../-.mount', | |
47 | testsuite08_dir + '/local-fs.target.wants/-.mount') | |
4ff3f251 | 48 | |
a18c7865 ZJS |
49 | if conf.get('ENABLE_RESOLVE') == 1 |
50 | install_subdir('test-resolve', | |
51 | install_dir : testdata_dir) | |
52 | endif | |
c8475239 | 53 | |
a18c7865 ZJS |
54 | install_data('create-busybox-container', |
55 | install_mode : 'rwxr-xr-x', | |
56 | install_dir : testdata_dir) | |
4ff3f251 ZJS |
57 | endif |
58 | ||
fbaa1137 ZJS |
59 | test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh') |
60 | ||
1256c481 ZJS |
61 | ############################################################ |
62 | ||
bd7e6aa7 ZJS |
63 | test_sysusers_dir = join_paths(meson.current_source_dir(), 'test-sysusers') |
64 | ||
65 | test_sysusers_sh = configure_file( | |
66 | input : 'test-sysusers.sh.in', | |
67 | output : 'test-sysusers.sh', | |
68 | configuration : substs) | |
69 | if install_tests and conf.get('ENABLE_SYSUSERS') == 1 | |
70 | install_data(test_sysusers_sh, | |
71 | install_dir : testsdir) | |
72 | install_subdir('test-sysusers', | |
73 | install_dir : testdata_dir) | |
74 | endif | |
75 | ||
76 | ############################################################ | |
77 | ||
6b97bf22 | 78 | rule_syntax_check_py = find_program('rule-syntax-check.py') |
938be089 ZJS |
79 | if want_tests != 'false' |
80 | test('rule-syntax-check', | |
81 | rule_syntax_check_py, | |
82 | args : all_rules) | |
83 | endif | |
6b97bf22 ZJS |
84 | |
85 | ############################################################ | |
86 | ||
1e99c1ee MG |
87 | if conf.get('HAVE_SYSV_COMPAT') == 1 |
88 | sysv_generator_test_py = find_program('sysv-generator-test.py') | |
938be089 ZJS |
89 | if want_tests != 'false' |
90 | test('sysv-generator-test', | |
91 | sysv_generator_test_py) | |
92 | endif | |
1e99c1ee | 93 | endif |
b7191b2a ZJS |
94 | |
95 | ############################################################ | |
96 | ||
3762f8e3 ZJS |
97 | if install_tests |
98 | install_data('run-unit-tests.py', | |
99 | install_mode : 'rwxr-xr-x', | |
100 | install_dir : testsdir) | |
fbaa1137 ZJS |
101 | install_data('test-network-generator-conversion.sh', |
102 | install_mode : 'rwxr-xr-x', | |
103 | install_dir : testsdir) | |
3762f8e3 ZJS |
104 | endif |
105 | ||
106 | ############################################################ | |
107 | ||
b7191b2a ZJS |
108 | # prepare test/sys tree |
109 | sys_script_py = find_program('sys-script.py') | |
110 | custom_target( | |
111 | 'sys', | |
112 | command : [sys_script_py, meson.current_build_dir()], | |
113 | output : 'sys', | |
fd1939fb | 114 | build_by_default : want_tests != 'false') |
b7191b2a | 115 | |
b1ffacb6 ZJS |
116 | if perl.found() |
117 | udev_test_pl = find_program('udev-test.pl') | |
938be089 ZJS |
118 | if want_tests != 'false' |
119 | test('udev-test', | |
bb0e9604 FS |
120 | udev_test_pl, |
121 | timeout : 180) | |
938be089 | 122 | endif |
b1ffacb6 ZJS |
123 | else |
124 | message('Skipping udev-test because perl is not available') | |
125 | endif | |
fdf666bc | 126 | |
1e99c1ee MG |
127 | if conf.get('ENABLE_HWDB') == 1 |
128 | hwdb_test_sh = find_program('hwdb-test.sh') | |
938be089 ZJS |
129 | if want_tests != 'false' |
130 | test('hwdb-test', | |
131 | hwdb_test_sh, | |
132 | timeout : 90) | |
133 | endif | |
1e99c1ee | 134 | endif |
b68dfb9e | 135 | |
c74a3f97 | 136 | subdir('fuzz') |