]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/meson.build
test: use systemd-journal-remote for journal copying, support $ARTIFACT_DIRECTORY
[thirdparty/systemd.git] / test / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 testdata_dir = testsdir + '/testdata/'
4
5 install_subdir('journal-data',
6 install_dir : testdata_dir)
7 install_subdir('units',
8 install_dir : testdata_dir)
9 install_subdir('test-execute',
10 install_dir : testdata_dir)
11 install_subdir('test-path',
12 install_dir : testdata_dir)
13 install_subdir('test-umount',
14 install_dir : testdata_dir)
15 install_subdir('test-network-generator-conversion',
16 install_dir : testdata_dir)
17 install_subdir('testsuite-04.units',
18 install_dir : testdata_dir)
19 install_subdir('testsuite-06.units',
20 install_dir : testdata_dir)
21 install_subdir('testsuite-10.units',
22 install_dir : testdata_dir)
23 install_subdir('testsuite-11.units',
24 install_dir : testdata_dir)
25 install_subdir('testsuite-16.units',
26 install_dir : testdata_dir)
27 install_subdir('testsuite-28.units',
28 install_dir : testdata_dir)
29 install_subdir('testsuite-30.units',
30 install_dir : testdata_dir)
31
32 testsuite08_dir = testdata_dir + '/testsuite-08.units'
33 install_data('testsuite-08.units/-.mount',
34 install_dir : testsuite08_dir)
35 install_data('testsuite-08.units/systemd-remount-fs.service',
36 install_dir : testsuite08_dir)
37 meson.add_install_script(meson_make_symlink,
38 './-.mount',
39 testsuite08_dir + '/root.mount')
40 meson.add_install_script(meson_make_symlink,
41 '../-.mount',
42 testsuite08_dir + '/local-fs.target.wants/-.mount')
43
44 if conf.get('ENABLE_RESOLVE') == 1
45 install_subdir('test-resolve',
46 install_dir : testdata_dir)
47 endif
48
49 install_data('create-busybox-container',
50 install_mode : 'rwxr-xr-x',
51 install_dir : testdata_dir)
52
53 test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh')
54
55 ############################################################
56
57 rule_syntax_check_py = find_program('rule-syntax-check.py')
58 if want_tests != 'false'
59 test('rule-syntax-check',
60 rule_syntax_check_py,
61 args : all_rules)
62 endif
63
64 ############################################################
65
66 if conf.get('HAVE_SYSV_COMPAT') == 1
67 sysv_generator_test_py = find_program('sysv-generator-test.py')
68 if want_tests != 'false'
69 test('sysv-generator-test',
70 sysv_generator_test_py)
71 endif
72 endif
73
74 ############################################################
75
76 if install_tests
77 install_data('run-unit-tests.py',
78 install_mode : 'rwxr-xr-x',
79 install_dir : testsdir)
80 install_data('test-network-generator-conversion.sh',
81 install_mode : 'rwxr-xr-x',
82 install_dir : testsdir)
83 endif
84
85 ############################################################
86
87 # prepare test/sys tree
88 sys_script_py = find_program('sys-script.py')
89 custom_target(
90 'sys',
91 command : [sys_script_py, meson.current_build_dir()],
92 output : 'sys',
93 build_by_default : want_tests != 'false')
94
95 if perl.found()
96 udev_test_pl = find_program('udev-test.pl')
97 if want_tests != 'false'
98 test('udev-test',
99 udev_test_pl,
100 timeout : 180)
101 endif
102 else
103 message('Skipping udev-test because perl is not available')
104 endif
105
106 if conf.get('ENABLE_HWDB') == 1
107 hwdb_test_sh = find_program('hwdb-test.sh')
108 if want_tests != 'false'
109 test('hwdb-test',
110 hwdb_test_sh,
111 timeout : 90)
112 endif
113 endif
114
115 subdir('fuzz')