]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/meson.build
core: use id unit when retrieving unit file state (#8038)
[thirdparty/systemd.git] / test / meson.build
CommitLineData
3a726fcd
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
3# Copyright 2017 Zbigniew Jędrzejewski-Szmek
4#
5# systemd is free software; you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation; either version 2.1 of the License, or
8# (at your option) any later version.
9#
10# systemd is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public License
16# along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
4ff3f251 18test_data_files = '''
37efbbd8 19 a.service
37efbbd8 20 b.service
9672b583 21 basic.target
37efbbd8 22 c.service
37efbbd8 23 d.service
9672b583 24 daughter.service
37efbbd8 25 e.service
9672b583 26 end.service
37efbbd8 27 f.service
37efbbd8 28 g.service
9672b583
LP
29 grandchild.service
30 h.service
37efbbd8
ZJS
31 hello-after-sleep.target
32 hello.service
9672b583
LP
33 hwdb/10-bad.hwdb
34 journal-data/journal-1.txt
35 journal-data/journal-2.txt
37efbbd8
ZJS
36 parent-deep.slice
37 parent.slice
38 sched_idle_bad.service
39 sched_idle_ok.service
40 sched_rr_bad.service
41 sched_rr_change.service
42 sched_rr_ok.service
43 shutdown.target
44 sleep.service
45 sockets.target
46 son.service
47 sysinit.target
f0e018e7 48 test-execute/exec-bindpaths.service
9672b583
LP
49 test-execute/exec-capabilityambientset-merge-nfsnobody.service
50 test-execute/exec-capabilityambientset-merge.service
51 test-execute/exec-capabilityambientset-nfsnobody.service
52 test-execute/exec-capabilityambientset.service
53 test-execute/exec-capabilityboundingset-invert.service
54 test-execute/exec-capabilityboundingset-merge.service
55 test-execute/exec-capabilityboundingset-reset.service
56 test-execute/exec-capabilityboundingset-simple.service
4e79aeaa
YW
57 test-execute/exec-cpuaffinity1.service
58 test-execute/exec-cpuaffinity2.service
59 test-execute/exec-cpuaffinity3.service
9672b583
LP
60 test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
61 test-execute/exec-dynamicuser-fixeduser.service
028f3a7f
YW
62 test-execute/exec-dynamicuser-statedir-migrate-step1.service
63 test-execute/exec-dynamicuser-statedir-migrate-step2.service
f0e018e7 64 test-execute/exec-dynamicuser-statedir.service
9672b583 65 test-execute/exec-dynamicuser-supplementarygroups.service
37efbbd8
ZJS
66 test-execute/exec-environment-empty.service
67 test-execute/exec-environment-multiple.service
68 test-execute/exec-environment.service
9672b583
LP
69 test-execute/exec-environmentfile.service
70 test-execute/exec-group-nfsnobody.service
66d73cc7 71 test-execute/exec-group-nogroup.service
9672b583
LP
72 test-execute/exec-group.service
73 test-execute/exec-ignoresigpipe-no.service
74 test-execute/exec-ignoresigpipe-yes.service
75 test-execute/exec-inaccessiblepaths-mount-propagation.service
76 test-execute/exec-inaccessiblepaths-proc.service
77 test-execute/exec-ioschedulingclass-best-effort.service
78 test-execute/exec-ioschedulingclass-idle.service
79 test-execute/exec-ioschedulingclass-none.service
80 test-execute/exec-ioschedulingclass-realtime.service
81 test-execute/exec-oomscoreadjust-negative.service
82 test-execute/exec-oomscoreadjust-positive.service
37efbbd8
ZJS
83 test-execute/exec-passenvironment-absent.service
84 test-execute/exec-passenvironment-empty.service
85 test-execute/exec-passenvironment-repeated.service
86 test-execute/exec-passenvironment.service
9672b583 87 test-execute/exec-personality-aarch64.service
37efbbd8
ZJS
88 test-execute/exec-personality-ppc64.service
89 test-execute/exec-personality-ppc64le.service
9672b583
LP
90 test-execute/exec-personality-s390.service
91 test-execute/exec-personality-x86-64.service
92 test-execute/exec-personality-x86.service
37efbbd8 93 test-execute/exec-privatedevices-no-capability-mknod.service
9672b583
LP
94 test-execute/exec-privatedevices-no-capability-sys-rawio.service
95 test-execute/exec-privatedevices-no.service
37efbbd8 96 test-execute/exec-privatedevices-yes-capability-mknod.service
9672b583
LP
97 test-execute/exec-privatedevices-yes-capability-sys-rawio.service
98 test-execute/exec-privatedevices-yes.service
99 test-execute/exec-privatenetwork-yes.service
100 test-execute/exec-privatetmp-no.service
101 test-execute/exec-privatetmp-yes.service
37efbbd8
ZJS
102 test-execute/exec-protectkernelmodules-no-capabilities.service
103 test-execute/exec-protectkernelmodules-yes-capabilities.service
104 test-execute/exec-protectkernelmodules-yes-mount-propagation.service
37efbbd8 105 test-execute/exec-readonlypaths-mount-propagation.service
f0e018e7 106 test-execute/exec-readonlypaths-simple.service
23fd04e9 107 test-execute/exec-readonlypaths-with-bindpaths.service
9672b583 108 test-execute/exec-readonlypaths.service
37efbbd8 109 test-execute/exec-readwritepaths-mount-propagation.service
f0e018e7
YW
110 test-execute/exec-restrictnamespaces-mnt-blacklist.service
111 test-execute/exec-restrictnamespaces-mnt.service
112 test-execute/exec-restrictnamespaces-no.service
113 test-execute/exec-restrictnamespaces-yes.service
9672b583
LP
114 test-execute/exec-runtimedirectory-mode.service
115 test-execute/exec-runtimedirectory-owner-nfsnobody.service
116 test-execute/exec-runtimedirectory-owner.service
117 test-execute/exec-runtimedirectory.service
f0e018e7 118 test-execute/exec-specifier-interpolation.service
9672b583 119 test-execute/exec-specifier.service
8b3c4b57 120 test-execute/exec-specifier@.service
f0e018e7
YW
121 test-execute/exec-standardinput-data.service
122 test-execute/exec-standardinput-file.service
9672b583
LP
123 test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service
124 test-execute/exec-supplementarygroups-multiple-groups-withgid.service
125 test-execute/exec-supplementarygroups-multiple-groups-withuid.service
126 test-execute/exec-supplementarygroups-single-group-user.service
127 test-execute/exec-supplementarygroups-single-group.service
128 test-execute/exec-supplementarygroups.service
7a18854f
YW
129 test-execute/exec-systemcallerrornumber-name.service
130 test-execute/exec-systemcallerrornumber-number.service
37efbbd8 131 test-execute/exec-systemcallfilter-failing.service
9672b583 132 test-execute/exec-systemcallfilter-failing2.service
37efbbd8 133 test-execute/exec-systemcallfilter-not-failing.service
9672b583 134 test-execute/exec-systemcallfilter-not-failing2.service
37efbbd8 135 test-execute/exec-systemcallfilter-system-user-nfsnobody.service
9672b583 136 test-execute/exec-systemcallfilter-system-user.service
b4891260
YW
137 test-execute/exec-systemcallfilter-with-errno-name.service
138 test-execute/exec-systemcallfilter-with-errno-number.service
9672b583
LP
139 test-execute/exec-umask-0177.service
140 test-execute/exec-umask-default.service
f0e018e7 141 test-execute/exec-unsetenvironment.service
37efbbd8 142 test-execute/exec-user-nfsnobody.service
9672b583 143 test-execute/exec-user.service
37efbbd8 144 test-execute/exec-workingdirectory.service
9672b583
LP
145 test-path/basic.target
146 test-path/path-changed.path
147 test-path/path-changed.service
148 test-path/path-directorynotempty.path
149 test-path/path-directorynotempty.service
150 test-path/path-exists.path
151 test-path/path-exists.service
152 test-path/path-existsglob.path
153 test-path/path-existsglob.service
154 test-path/path-makedirectory.path
155 test-path/path-makedirectory.service
156 test-path/path-modified.path
157 test-path/path-modified.service
158 test-path/path-mycustomunit.service
159 test-path/path-service.service
160 test-path/path-unit.path
161 test-path/paths.target
162 test-path/sysinit.target
163 testsuite.target
164 timers.target
165 unstoppable.service
4ff3f251
ZJS
166'''.split()
167
1ec57f33 168if conf.get('ENABLE_RESOLVE') == 1
37efbbd8
ZJS
169 test_data_files += '''
170 test-resolve/_openpgpkey.fedoraproject.org.pkts
171 test-resolve/fedoraproject.org.pkts
172 test-resolve/gandi.net.pkts
173 test-resolve/google.com.pkts
174 test-resolve/root.pkts
175 test-resolve/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
176 test-resolve/teamits.com.pkts
177 test-resolve/zbyszek@fedoraproject.org.pkts
178 test-resolve/_443._tcp.fedoraproject.org.pkts
179 test-resolve/kyhwana.org.pkts
180 test-resolve/fake-caa.pkts
181 '''.split()
4ff3f251
ZJS
182endif
183
184if install_tests
37efbbd8
ZJS
185 foreach file : test_data_files
186 subdir = file.split('/')[0]
187 if subdir == file
188 subdir = ''
189 endif
4ff3f251 190
37efbbd8
ZJS
191 install_data(file,
192 install_dir : testsdir + '/testdata/' + subdir)
193 endforeach
4ff3f251 194endif
1256c481
ZJS
195
196############################################################
197
6b97bf22
ZJS
198rule_syntax_check_py = find_program('rule-syntax-check.py')
199test('rule-syntax-check',
200 rule_syntax_check_py,
201 args : all_rules)
202
203############################################################
204
1e99c1ee
MG
205if conf.get('HAVE_SYSV_COMPAT') == 1
206 sysv_generator_test_py = find_program('sysv-generator-test.py')
207 test('sysv-generator-test',
208 sysv_generator_test_py)
209endif
b7191b2a
ZJS
210
211############################################################
212
213# prepare test/sys tree
214sys_script_py = find_program('sys-script.py')
215custom_target(
216 'sys',
217 command : [sys_script_py, meson.current_build_dir()],
218 output : 'sys',
219 build_by_default : true)
220
221udev_test_pl = find_program('udev-test.pl')
222test('udev-test',
223 udev_test_pl)
fdf666bc 224
1e99c1ee
MG
225if conf.get('ENABLE_HWDB') == 1
226 hwdb_test_sh = find_program('hwdb-test.sh')
227 test('hwdb-test',
3113b5ac
ZJS
228 hwdb_test_sh,
229 timeout : 90)
1e99c1ee 230endif
b68dfb9e
ZJS
231
232subdir('fuzz-regressions')