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