# SPDX-License-Identifier: LGPL-2.1+
-#
-# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# systemd is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with systemd; If not, see <http://www.gnu.org/licenses/>.
test_data_files = '''
a.service
hwdb/10-bad.hwdb
journal-data/journal-1.txt
journal-data/journal-2.txt
+ nomem.slice
+ nomemleaf.service
parent-deep.slice
parent.slice
sched_idle_bad.service
sockets.target
son.service
sysinit.target
+ test-execute/exec-basic.service
test-execute/exec-ambientcapabilities-merge-nfsnobody.service
test-execute/exec-ambientcapabilities-merge-nobody.service
test-execute/exec-ambientcapabilities-merge.service
test-execute/exec-cpuaffinity1.service
test-execute/exec-cpuaffinity2.service
test-execute/exec-cpuaffinity3.service
+ test-execute/exec-dynamicuser-fixeduser-adm.service
+ test-execute/exec-dynamicuser-fixeduser-games.service
test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
test-execute/exec-dynamicuser-fixeduser.service
test-execute/exec-dynamicuser-statedir-migrate-step1.service
test-execute/exec-dynamicuser-statedir-migrate-step2.service
test-execute/exec-dynamicuser-statedir.service
test-execute/exec-dynamicuser-supplementarygroups.service
+ test-execute/exec-environment-no-substitute.service
test-execute/exec-environment-empty.service
test-execute/exec-environment-multiple.service
test-execute/exec-environment.service
test-execute/exec-personality-s390.service
test-execute/exec-personality-x86-64.service
test-execute/exec-personality-x86.service
+ test-execute/exec-privatedevices-disabled-by-prefix.service
test-execute/exec-privatedevices-no-capability-mknod.service
test-execute/exec-privatedevices-no-capability-sys-rawio.service
test-execute/exec-privatedevices-no.service
test-execute/exec-readonlypaths-with-bindpaths.service
test-execute/exec-readonlypaths.service
test-execute/exec-readwritepaths-mount-propagation.service
+ test-execute/exec-restrictnamespaces-merge-all.service
+ test-execute/exec-restrictnamespaces-merge-and.service
+ test-execute/exec-restrictnamespaces-merge-or.service
test-execute/exec-restrictnamespaces-mnt-blacklist.service
test-execute/exec-restrictnamespaces-mnt.service
test-execute/exec-restrictnamespaces-no.service
test-execute/exec-specifier@.service
test-execute/exec-standardinput-data.service
test-execute/exec-standardinput-file.service
+ test-execute/exec-standardoutput-file.service
+ test-execute/exec-standardoutput-append.service
test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service
test-execute/exec-supplementarygroups-multiple-groups-withgid.service
test-execute/exec-supplementarygroups-multiple-groups-withuid.service
test-execute/exec-systemcallfilter-system-user-nfsnobody.service
test-execute/exec-systemcallfilter-system-user-nobody.service
test-execute/exec-systemcallfilter-system-user.service
+ test-execute/exec-systemcallfilter-with-errno-multi.service
test-execute/exec-systemcallfilter-with-errno-name.service
test-execute/exec-systemcallfilter-with-errno-number.service
test-execute/exec-temporaryfilesystem-options.service
test-execute/exec-user-nobody.service
test-execute/exec-user.service
test-execute/exec-workingdirectory.service
+ test-execute/exec-workingdirectory-trailing-dot.service
test-path/basic.target
test-path/path-changed.path
test-path/path-changed.service
test-path/path-unit.path
test-path/paths.target
test-path/sysinit.target
- testsuite.target
- timers.target
- unstoppable.service
test-umount/empty.mountinfo
+ test-umount/example.swaps
test-umount/garbled.mountinfo
test-umount/rhbug-1554943.mountinfo
- test-umount/example.swaps
+ testsuite.target
+ timers.target
+ unit-with-.service.d/20-override.conf
+ unit-with-multiple-.service.d/20-override.conf
+ unit-with-multiple-.service.d/30-override.conf
+ unit-with-multiple-dashes.service
+ unit-with-multiple-dashes.service.d/10-override.conf
+ unstoppable.service
'''.split()
if conf.get('ENABLE_RESOLVE') == 1
############################################################
rule_syntax_check_py = find_program('rule-syntax-check.py')
-test('rule-syntax-check',
- rule_syntax_check_py,
- args : all_rules)
+if want_tests != 'false'
+ test('rule-syntax-check',
+ rule_syntax_check_py,
+ args : all_rules)
+endif
############################################################
if conf.get('HAVE_SYSV_COMPAT') == 1
sysv_generator_test_py = find_program('sysv-generator-test.py')
- test('sysv-generator-test',
- sysv_generator_test_py)
+ if want_tests != 'false'
+ test('sysv-generator-test',
+ sysv_generator_test_py)
+ endif
+endif
+
+############################################################
+
+if install_tests
+ install_data('run-unit-tests.py',
+ install_mode : 'rwxr-xr-x',
+ install_dir : testsdir)
endif
############################################################
'sys',
command : [sys_script_py, meson.current_build_dir()],
output : 'sys',
- build_by_default : true)
+ build_by_default : want_tests != 'false')
-udev_test_pl = find_program('udev-test.pl')
-test('udev-test',
- udev_test_pl)
+if perl.found()
+ udev_test_pl = find_program('udev-test.pl')
+ if want_tests != 'false'
+ test('udev-test',
+ udev_test_pl,
+ timeout : 180)
+ endif
+else
+ message('Skipping udev-test because perl is not available')
+endif
if conf.get('ENABLE_HWDB') == 1
hwdb_test_sh = find_program('hwdb-test.sh')
- test('hwdb-test',
- hwdb_test_sh,
- timeout : 90)
+ if want_tests != 'false'
+ test('hwdb-test',
+ hwdb_test_sh,
+ timeout : 90)
+ endif
endif
-subdir('fuzz-regressions')
+subdir('fuzz')