]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/meson.build
tests: introduce dummy_server_init and use it in all journald fuzzers
[thirdparty/systemd.git] / test / meson.build
index 809bd44a9301761f9cd7177c6f942f785d4558b4..bf02e39f4320446060410d9cb31dd497f591c69e 100644 (file)
@@ -1,19 +1,4 @@
 # 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
@@ -45,6 +30,7 @@ test_data_files = '''
         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
@@ -59,6 +45,8 @@ test_data_files = '''
         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
@@ -93,6 +81,7 @@ test_data_files = '''
         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
@@ -110,6 +99,9 @@ test_data_files = '''
         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
@@ -125,6 +117,8 @@ test_data_files = '''
         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
@@ -140,6 +134,7 @@ test_data_files = '''
         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
@@ -153,6 +148,7 @@ test_data_files = '''
         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
@@ -171,13 +167,18 @@ test_data_files = '''
         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
@@ -211,16 +212,28 @@ endif
 ############################################################
 
 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
 
 ############################################################
@@ -231,21 +244,25 @@ custom_target(
         'sys',
         command : [sys_script_py, meson.current_build_dir()],
         output : 'sys',
-        build_by_default : true)
+        build_by_default : want_tests != 'false')
 
 if perl.found()
         udev_test_pl = find_program('udev-test.pl')
-        test('udev-test',
-             udev_test_pl)
+        if want_tests != 'false'
+                test('udev-test',
+                     udev_test_pl)
+        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')