]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/meson.build
test: add test cases for RuntimeDirectoryPreserve=yes
[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 rule_syntax_check_py = find_program('rule-syntax-check.py')
62 if want_tests != 'false'
63 test('rule-syntax-check',
64 rule_syntax_check_py,
65 args : all_rules)
66 endif
67
68 ############################################################
69
70 if conf.get('HAVE_SYSV_COMPAT') == 1
71 sysv_generator_test_py = find_program('sysv-generator-test.py')
72 if want_tests != 'false'
73 test('sysv-generator-test',
74 sysv_generator_test_py)
75 endif
76 endif
77
78 ############################################################
79
80 if install_tests
81 install_data('run-unit-tests.py',
82 install_mode : 'rwxr-xr-x',
83 install_dir : testsdir)
84 install_data('test-network-generator-conversion.sh',
85 install_mode : 'rwxr-xr-x',
86 install_dir : testsdir)
87 endif
88
89 ############################################################
90
91 # prepare test/sys tree
92 sys_script_py = find_program('sys-script.py')
93 custom_target(
94 'sys',
95 command : [sys_script_py, meson.current_build_dir()],
96 output : 'sys',
97 build_by_default : want_tests != 'false')
98
99 if perl.found()
100 udev_test_pl = find_program('udev-test.pl')
101 if want_tests != 'false'
102 test('udev-test',
103 udev_test_pl,
104 timeout : 180)
105 endif
106 else
107 message('Skipping udev-test because perl is not available')
108 endif
109
110 if conf.get('ENABLE_HWDB') == 1
111 hwdb_test_sh = find_program('hwdb-test.sh')
112 if want_tests != 'false'
113 test('hwdb-test',
114 hwdb_test_sh,
115 timeout : 90)
116 endif
117 endif
118
119 subdir('fuzz')