diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0be4e40cab..c93156be31 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,7 +13,7 @@ on: - v[0-9]+-stable paths: - .github/workflows/coverage.yml - - test/integration-test-wrapper.py + - test/integration-tests/integration-test-wrapper.py permissions: contents: read diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index be9a84ee46..446658952c 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -37,7 +37,7 @@ jobs: VALIDATE_GITHUB_ACTIONS: true - name: Check that tabs are not used in Python code - run: sh -c '! git grep -P "\\t" -- src/boot/generate-hwids-section.py src/ukify/ukify.py test/integration-test-wrapper.py' + run: sh -c '! git grep -P "\\t" -- src/boot/generate-hwids-section.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py' - name: Install ruff and mypy run: | @@ -47,18 +47,18 @@ jobs: - name: Run mypy run: | python3 -m mypy --version - python3 -m mypy src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py + python3 -m mypy src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py - name: Run ruff check run: | ruff --version - ruff check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py + ruff check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py - name: Run ruff format run: | ruff --version - if ! ruff format --check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py + if ! ruff format --check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py then echo "Please run 'ruff format' on the above files or apply the diffs below manually" - ruff format --check --quiet --diff src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py + ruff format --check --quiet --diff src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py fi diff --git a/.gitignore b/.gitignore index 002de63d6a..0944d31106 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,9 @@ __pycache__/ /mkosi.installdir/ /mkosi.key /mkosi.crt -/mkosi.tools +/mkosi.tools/ /mkosi.tools.manifest +/.mkosi-private/ mkosi.local.conf /tags .dir-locals-2.el diff --git a/README b/README index 452141dbac..0caf42b9d5 100644 --- a/README +++ b/README @@ -313,14 +313,6 @@ REQUIREMENTS: https://systemd.io/SEPARATE_USR_IS_BROKEN https://systemd.io/THE_CASE_FOR_THE_USR_MERGE - Additional packages are necessary to run some tests: - - nc (used by test/TEST-12-ISSUE-3171) - - python (test-udev which is installed is in python) - - python-pyparsing - - python-evdev (used by hwdb parsing tests) - - strace (used by test/test-functions) - - capsh (optional, used by test-execute) - POLICY FOR SUPPORT OF DISTRIBUTIONS AND ARCHITECTURES: systemd main branch and latest major or stable releases are generally expected to compile on current versions of popular distributions (at diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 9db8e71203..7994bbe569 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -122,7 +122,7 @@ Sources in `test/TEST-*` implement system-level testing for executables, librari Most of those tests should be able to run via `systemd-nspawn`, which is orders-of-magnitude faster than `qemu`, but some tests require privileged operations like using `dm-crypt` or `loopdev`. They are clearly marked if that is the case. -See [`test/README.md`](https://github.com/systemd/systemd/blob/main/test/README.md) for more specific details. +See [`test/integration-tests/README.md`](https://github.com/systemd/systemd/blob/main/test/integration-tests/README.md) for more specific details. ## hwdb diff --git a/docs/CODE_QUALITY.md b/docs/CODE_QUALITY.md index 4caf38f7e8..df4ade3b41 100644 --- a/docs/CODE_QUALITY.md +++ b/docs/CODE_QUALITY.md @@ -21,9 +21,10 @@ available functionality: change these flags for an already set up build tree, too, with "meson configure -C build -D…".) -2. Use `./test/run-integration-tests.sh` to run the full integration test - suite. This will build OS images with a number of integration tests and run - them using `systemd-nspawn` and `qemu`. Requires root. +2. Run the full integration test suite as described in + [test/integration-tests/README.md](/../test/integration-tests/README.md). + This will build OS images with a number of integration tests and run them + using `systemd-nspawn` and `qemu`. Requires root. 3. Use `./coccinelle/run-coccinelle.sh` to run all [Coccinelle](http://coccinelle.lip6.fr/) semantic patch scripts we ship. The diff --git a/docs/TESTING_WITH_SANITIZERS.md b/docs/TESTING_WITH_SANITIZERS.md index 39920c64d0..9b5b0896c0 100644 --- a/docs/TESTING_WITH_SANITIZERS.md +++ b/docs/TESTING_WITH_SANITIZERS.md @@ -102,5 +102,4 @@ make things work as expected in most cases. This will, obviously, not work with statically linked sanitizer libraries. These shenanigans are performed automatically when running the integration test -suite (i.e. `test/TEST-??-*`) and are located in `test/test-functions` (mainly, -but not only, in the `create_asan_wrapper` function). +suite. diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build index e7dfd0bea2..a564cc4bf7 100644 --- a/hwdb.d/meson.build +++ b/hwdb.d/meson.build @@ -80,4 +80,4 @@ run_target( run_target( 'update-hwdb-autosuspend', - command : [update_hwdb_autosuspend_sh, project_source_root]) + command : [update_hwdb_autosuspend_sh, meson.project_source_root()]) diff --git a/man/meson.build b/man/meson.build index 90c6fef4d6..c12b7e6dde 100644 --- a/man/meson.build +++ b/man/meson.build @@ -212,7 +212,7 @@ endif ############################################################ buildroot_substs = configuration_data() -buildroot_substs.set_quoted('BUILD_ROOT', project_build_root) +buildroot_substs.set_quoted('BUILD_ROOT', meson.project_build_root()) configure_file( input : 'man.in', @@ -229,7 +229,7 @@ configure_file( update_dbus_docs = custom_target( 'update-dbus-docs-impl', output : 'update-dbus-docs', - command : [update_dbus_docs_py, '--build-dir', project_build_root, '@INPUT@'], + command : [update_dbus_docs_py, '--build-dir', meson.project_build_root(), '@INPUT@'], input : dbus_docs, depends : dbus_programs) @@ -237,7 +237,7 @@ if conf.get('BUILD_MODE_DEVELOPER') == 1 test('dbus-docs-fresh', update_dbus_docs_py, suite : 'dist', - args : ['--build-dir', project_build_root, '--test', dbus_docs], + args : ['--build-dir', meson.project_build_root(), '--test', dbus_docs], depends : dbus_programs) test('check-version-history', @@ -250,7 +250,7 @@ update_man_rules = custom_target( 'update-man-rules-impl', output : 'update-man-rules', command : [update_man_rules_py, - '@0@/man/*.xml'.format(project_source_root), + '@0@/man/*.xml'.format(meson.project_source_root()), '@0@/rules/meson.build'.format(meson.current_source_dir())], depends : man_page_depends) diff --git a/meson.build b/meson.build index 57e26dfed6..3ddc15473c 100644 --- a/meson.build +++ b/meson.build @@ -29,13 +29,9 @@ conf.set('PROJECT_VERSION', project_major_version, description : 'Numerical project version (used where a simple number is expected)') conf.set_quoted('PROJECT_VERSION_FULL', meson.project_version(), description : 'Full project version') -# This is to be used instead of meson.source_root(), as the latter will return -# the wrong result when systemd is being built as a meson subproject -project_source_root = meson.current_source_dir() -project_build_root = meson.current_build_dir() relative_source_path = run_command('realpath', - '--relative-to=@0@'.format(project_build_root), - project_source_root, + '--relative-to=@0@'.format(meson.project_build_root()), + meson.project_source_root(), check : true).stdout().strip() conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path) @@ -2173,8 +2169,8 @@ runtest_env = custom_target( output : 'systemd-runtest.env', command : [sh, '-c', '{ echo SYSTEMD_TEST_DATA=@0@; echo SYSTEMD_CATALOG_DIR=@1@; } >@OUTPUT@'.format( - project_source_root / 'test', - project_build_root / 'catalog')], + meson.project_source_root() / 'test', + meson.project_build_root() / 'catalog')], depends : catalogs, build_by_default : true) @@ -2747,8 +2743,8 @@ if get_option('mode') == 'developer' and want_tests != 'false' and jekyll.found( jekyll, suite : 'dist', args : ['build', - '--source', project_source_root / 'docs', - '--destination', project_build_root / '_site']) + '--source', meson.project_source_root() / 'docs', + '--destination', meson.project_build_root() / '_site']) endif ##################################################################### @@ -2825,7 +2821,7 @@ endforeach if git.found() all_files = run_command( env, '-u', 'GIT_WORK_TREE', - git, '--git-dir=@0@/.git'.format(project_source_root), + git, '--git-dir=@0@/.git'.format(meson.project_source_root()), 'ls-files', ':/*.[ch]', ':/*.cc', check : false) if all_files.returncode() == 0 @@ -2834,10 +2830,10 @@ if git.found() custom_target( 'tags', output : 'tags', - command : [env, 'etags', '-o', '@0@/TAGS'.format(project_source_root)] + all_files) + command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.project_source_root())] + all_files) run_target( 'ctags', - command : [env, 'ctags', '--tag-relative=never', '-o', '@0@/tags'.format(project_source_root)] + all_files) + command : [env, 'ctags', '--tag-relative=never', '-o', '@0@/tags'.format(meson.project_source_root())] + all_files) ############################################ @@ -2845,7 +2841,7 @@ if git.found() test('check-includes', files('tools/check-includes.py'), args: all_files, - env : ['PROJECT_SOURCE_ROOT=@0@'.format(project_source_root)], + env : ['PROJECT_SOURCE_ROOT=@0@'.format(meson.project_source_root())], suite : 'headers') endif endif @@ -2860,18 +2856,18 @@ if git.found() #################################################### git_head = run_command( - git, '--git-dir=@0@/.git'.format(project_source_root), + git, '--git-dir=@0@/.git'.format(meson.project_source_root()), 'rev-parse', 'HEAD', check : false).stdout().strip() git_head_short = run_command( - git, '--git-dir=@0@/.git'.format(project_source_root), + git, '--git-dir=@0@/.git'.format(meson.project_source_root()), 'rev-parse', '--short=7', 'HEAD', check : false).stdout().strip() run_target( 'git-snapshot', command : [git, 'archive', - '-o', '@0@/systemd-@1@.tar.gz'.format(project_source_root, + '-o', '@0@/systemd-@1@.tar.gz'.format(meson.project_source_root(), git_head_short), '--prefix', 'systemd-@0@/'.format(git_head), 'HEAD']) @@ -2903,7 +2899,7 @@ custom_target('installed-unit-files.txt', capture : true, install : want_tests != 'no' and install_tests, install_dir : testdata_dir, - command : [meson_extract_unit_files, project_build_root]) + command : [meson_extract_unit_files, meson.project_build_root()]) ##################################################################### diff --git a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot index f845f288c0..2363b92ad5 100755 --- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot @@ -64,6 +64,12 @@ if ((COVERAGE)); then MKOSI_CFLAGS="$MKOSI_CFLAGS -fprofile-dir=/coverage" fi +# The opensuse spec tars up stuff in test/ and unpacks it in test/integration-tests, which we now use for our +# own purposes, so let's get rid of that specific bit of logic in the opensuse spec until they've had a chance +# to adapt. +sed "pkg/$PKG_SUBDIR${GIT_SUBDIR:+/$GIT_SUBDIR}/systemd.spec" -e '1062,1075d' -e '/integration-tests\/README/d' >/tmp/systemd.spec +mount --bind /tmp/systemd.spec "pkg/$PKG_SUBDIR${GIT_SUBDIR:+/$GIT_SUBDIR}/systemd.spec" + build() { IFS= # shellcheck disable=SC2046 diff --git a/mkosi.postinst.chroot b/mkosi.postinst.chroot index 914502a473..3a021bffd9 100755 --- a/mkosi.postinst.chroot +++ b/mkosi.postinst.chroot @@ -58,8 +58,8 @@ SYSTEMD_REPART_MKFS_OPTIONS_EXT4="" \ --dry-run=no \ --size=auto \ --offline=true \ - --root test/TEST-24-CRYPTSETUP \ - --definitions test/TEST-24-CRYPTSETUP/keydev.repart \ + --root test/integration-tests/TEST-24-CRYPTSETUP \ + --definitions test/integration-tests/TEST-24-CRYPTSETUP/keydev.repart \ "$OUTPUTDIR/keydev.raw" can_test_pkcs11() { @@ -132,7 +132,7 @@ EOF certtool --generate-self-signed \ --load-privkey="pkcs11:token=TestToken;object=RSATestKey;type=private" \ --load-pubkey="pkcs11:token=TestToken;object=RSATestKey;type=public" \ - --template "test/TEST-24-CRYPTSETUP/template.cfg" \ + --template "test/integration-tests/TEST-24-CRYPTSETUP/template.cfg" \ --outder --outfile "/tmp/rsa_test.crt" pkcs11-tool --module "$SOFTHSM_MODULE" --token-label "TestToken" --pin "env:GNUTLS_PIN" --so-pin "env:GNUTLS_SO_PIN" --write-object "/tmp/rsa_test.crt" --type cert --label "RSATestKey" @@ -144,7 +144,7 @@ EOF certtool --generate-self-signed \ --load-privkey="pkcs11:token=TestToken;object=ECTestKey;type=private" \ --load-pubkey="pkcs11:token=TestToken;object=ECTestKey;type=public" \ - --template "test/TEST-24-CRYPTSETUP/template.cfg" \ + --template "test/integration-tests/TEST-24-CRYPTSETUP/template.cfg" \ --outder --outfile "/tmp/ec_test.crt" pkcs11-tool --module "$SOFTHSM_MODULE" --token-label "TestToken" --pin "env:GNUTLS_PIN" --so-pin "env:GNUTLS_SO_PIN" --write-object "/tmp/ec_test.crt" --type cert --label "ECTestKey" diff --git a/src/test/meson.build b/src/test/meson.build index 14d813fee1..a4c33cb50c 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -12,8 +12,8 @@ test_hashmap_ordered_c = custom_target( path = run_command(sh, '-c', 'echo "$PATH"', check: true).stdout().strip() test_env = environment() test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map) -test_env.set('PATH', project_build_root + ':' + path) -test_env.set('PROJECT_BUILD_ROOT', project_build_root) +test_env.set('PATH', meson.project_build_root() + ':' + path) +test_env.set('PROJECT_BUILD_ROOT', meson.project_build_root()) test_env.set('SYSTEMD_SLOW_TESTS', want_slow_tests ? '1' : '0') if efi_addon != '' diff --git a/test/TEST-52-HONORFIRSTSHUTDOWN/meson.build b/test/TEST-52-HONORFIRSTSHUTDOWN/meson.build deleted file mode 100644 index 08503e8822..0000000000 --- a/test/TEST-52-HONORFIRSTSHUTDOWN/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -integration_tests += [ - integration_test_template + { - 'name' : fs.name(meson.current_source_dir()), - }, -] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-52-HONORFIRSTSHUTDOWN.units'] diff --git a/test/TEST-85-NETWORK/meson.build b/test/TEST-85-NETWORK/meson.build deleted file mode 100644 index 47ec02940e..0000000000 --- a/test/TEST-85-NETWORK/meson.build +++ /dev/null @@ -1,31 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -name = fs.name(meson.current_source_dir()) -unit = configure_file( - input : files('../test.service.in'), - output : '@0@.service'.format(name), - configuration : integration_test_template['configuration'] + { - 'command' : '@0@ --no-journal'.format(testdata_dir / 'test-network/systemd-networkd-tests.py') - }, -) - -systemd_networkd_tests_py = files('../test-network/systemd-networkd-tests.py') -network_testcases = run_command('sed', - '-ne', - '/^class .*Tests/ { s/^class *//; s/(.*$//; p}', - systemd_networkd_tests_py, - check : true).stdout().split() - -foreach testcase : network_testcases - integration_tests += [ - integration_test_template + { - 'name' : '@0@-@1@'.format(name, testcase), - 'unit' : unit, - 'cmdline' : integration_test_template['cmdline'] + [ - 'systemd.setenv=TEST_MATCH_TESTCASE=@0@'.format(testcase) - ], - 'priority' : 10, - 'vm' : true, - }, - ] -endforeach diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build index d88d6218d2..db1dcb291c 100644 --- a/test/fuzz/meson.build +++ b/test/fuzz/meson.build @@ -55,7 +55,7 @@ sanitize_address_undefined = custom_target( 'sanitize-address-undefined-fuzzers', output : 'sanitize-address-undefined-fuzzers', command : [meson_build_sh, - project_source_root, + meson.project_source_root(), '@OUTPUT@', 'fuzzers', ' '.join(fuzz_c_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'), @@ -71,13 +71,13 @@ sanitize_address_undefined = custom_target( fuzz_sanitizers = [['address,undefined', sanitize_address_undefined]] fuzz_testsdir = 'test/fuzz' -if git.found() and fs.is_dir(project_source_root / '.git') +if git.found() and fs.is_dir(meson.project_source_root() / '.git') out = run_command(env, '-u', 'GIT_WORK_TREE', - git, '--git-dir=@0@/.git'.format(project_source_root), + git, '--git-dir=@0@/.git'.format(meson.project_source_root()), 'ls-files', ':/@0@/*/*'.format(fuzz_testsdir), check: true) else - out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(project_source_root, fuzz_testsdir), check: true) + out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true) endif # Add crafted fuzz inputs we have in the repo diff --git a/test/README.md b/test/integration-tests/README.md similarity index 95% rename from test/README.md rename to test/integration-tests/README.md index 5dade6b421..9cd3ea7480 100644 --- a/test/README.md +++ b/test/integration-tests/README.md @@ -151,6 +151,31 @@ options to provide mkosi with a directory containing the systemd packages or a repository file that points to a repository with the systemd packages that should be installed. +If the rpms are installed on the host system that the tests are running on, +you'll probably want to disable usage of the tools tree so that the tools from +the host system are used to build the image by adding the following to +`mkosi.local.conf`: + +```conf +[Build] +ToolsTree= +``` + +On the other hand, if the rpms are available but not installed on the host +system, you'll want to make sure they're installed into the mkosi tools tree so +that they're used to build the image by using either +`ToolsTreePackageDirectories=` or `ToolsTreeSandboxTrees=` similarly to +`PackageDirectories=` or `SandboxTrees=` mentioned above. + +Finally, we'll make use of the standalone mode of running the integration tests +to avoid having to install any build dependencies. + +```sh +$ mkosi -f sandbox -- meson setup testsuite test/integration-tests/standalone +$ mkosi -f +$ mkosi sandbox -- meson test -C testsuite --num-processes "$(($(nproc) / 4))" +``` + ### SELinux AVCs To have `TEST-06-SELINUX` check for SELinux denials, write the following to diff --git a/test/TEST-01-BASIC/meson.build b/test/integration-tests/TEST-01-BASIC/meson.build similarity index 100% rename from test/TEST-01-BASIC/meson.build rename to test/integration-tests/TEST-01-BASIC/meson.build diff --git a/test/TEST-02-UNITTESTS/meson.build b/test/integration-tests/TEST-02-UNITTESTS/meson.build similarity index 100% rename from test/TEST-02-UNITTESTS/meson.build rename to test/integration-tests/TEST-02-UNITTESTS/meson.build diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.socket b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.socket similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.socket rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/always-activating.socket diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/counter.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/counter.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/counter.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/counter.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/counter.sh b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/counter.sh similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/counter.sh rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/counter.sh diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart-restartdirect.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/fails-on-restart.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/hello-after-sleep.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/hello-after-sleep.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/hello-after-sleep.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/hello-after-sleep.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/hello.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/hello.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/hello.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/hello.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-and-pullin.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-and-pullin.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-and-pullin.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-and-pullin.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-indirect.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-indirect.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-indirect.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-indirect.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-only.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-only.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-only.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/propagatestopto-only.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/restart-on-failure.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/restart-on-failure.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/restart-on-failure.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/restart-on-failure.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-direct.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-direct.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-direct.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-direct.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-normal.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-normal.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-normal.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-restart-normal.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-simple.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-simple.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-simple.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep-infinity-simple.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/sleep.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/sleep.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/sleep.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart-restartdirect.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.service diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.sh b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.sh similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.sh rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.sh diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.target b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.target similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.target rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/succeeds-on-restart.target diff --git a/test/TEST-03-JOBS/TEST-03-JOBS.units/unstoppable.service b/test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/unstoppable.service similarity index 100% rename from test/TEST-03-JOBS/TEST-03-JOBS.units/unstoppable.service rename to test/integration-tests/TEST-03-JOBS/TEST-03-JOBS.units/unstoppable.service diff --git a/test/TEST-15-DROPIN/meson.build b/test/integration-tests/TEST-03-JOBS/meson.build similarity index 100% rename from test/TEST-15-DROPIN/meson.build rename to test/integration-tests/TEST-03-JOBS/meson.build diff --git a/test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated-cgroup-filtering.service b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated-cgroup-filtering.service similarity index 100% rename from test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated-cgroup-filtering.service rename to test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/delegated-cgroup-filtering.service diff --git a/test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/forever-print-hola.service b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/forever-print-hola.service similarity index 100% rename from test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/forever-print-hola.service rename to test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/forever-print-hola.service diff --git a/test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/logs-filtering.service b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/logs-filtering.service similarity index 100% rename from test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/logs-filtering.service rename to test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/logs-filtering.service diff --git a/test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/silent-success.service b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/silent-success.service similarity index 100% rename from test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/silent-success.service rename to test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/silent-success.service diff --git a/test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/verbose-success.service b/test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/verbose-success.service similarity index 100% rename from test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/verbose-success.service rename to test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/verbose-success.service diff --git a/test/TEST-04-JOURNAL/meson.build b/test/integration-tests/TEST-04-JOURNAL/meson.build similarity index 78% rename from test/TEST-04-JOURNAL/meson.build rename to test/integration-tests/TEST-04-JOURNAL/meson.build index 5a0b073c02..184f70ab72 100644 --- a/test/TEST-04-JOURNAL/meson.build +++ b/test/integration-tests/TEST-04-JOURNAL/meson.build @@ -8,5 +8,3 @@ integration_tests += [ 'storage' : 'persistent', }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-04-JOURNAL.units'] diff --git a/test/TEST-05-RLIMITS/meson.build b/test/integration-tests/TEST-05-RLIMITS/meson.build similarity index 100% rename from test/TEST-05-RLIMITS/meson.build rename to test/integration-tests/TEST-05-RLIMITS/meson.build diff --git a/test/TEST-06-SELINUX/TEST-06-SELINUX.units/hola.service b/test/integration-tests/TEST-06-SELINUX/TEST-06-SELINUX.units/hola.service similarity index 100% rename from test/TEST-06-SELINUX/TEST-06-SELINUX.units/hola.service rename to test/integration-tests/TEST-06-SELINUX/TEST-06-SELINUX.units/hola.service diff --git a/test/TEST-06-SELINUX/meson.build b/test/integration-tests/TEST-06-SELINUX/meson.build similarity index 90% rename from test/TEST-06-SELINUX/meson.build rename to test/integration-tests/TEST-06-SELINUX/meson.build index fd670ae40d..e2f329d17c 100644 --- a/test/TEST-06-SELINUX/meson.build +++ b/test/integration-tests/TEST-06-SELINUX/meson.build @@ -13,5 +13,3 @@ integration_tests += [ 'mkosi-args' : integration_test_template['mkosi-args'] + ['--runtime-build-sources=no'], }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-06-SELINUX.units'] diff --git a/test/TEST-07-PID1/TEST-07-PID1.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-1.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-1.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-1.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-1.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-2.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-2.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-2.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-2.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-3.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-3.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-3.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-3.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2467.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue2467.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2467.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue27953.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue27953.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue27953.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue27953.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue3166-fail-on-restart.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue3166-fail-on-restart.service similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/issue3166-fail-on-restart.service rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue3166-fail-on-restart.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket similarity index 100% rename from test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket rename to test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket diff --git a/test/TEST-07-PID1/meson.build b/test/integration-tests/TEST-07-PID1/meson.build similarity index 76% rename from test/TEST-07-PID1/meson.build rename to test/integration-tests/TEST-07-PID1/meson.build index 311860dc89..3b31782108 100644 --- a/test/TEST-07-PID1/meson.build +++ b/test/integration-tests/TEST-07-PID1/meson.build @@ -6,5 +6,3 @@ integration_tests += [ 'unit' : files('TEST-07-PID1.service'), }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-07-PID1.units'] diff --git a/test/TEST-08-INITRD/meson.build b/test/integration-tests/TEST-08-INITRD/meson.build similarity index 100% rename from test/TEST-08-INITRD/meson.build rename to test/integration-tests/TEST-08-INITRD/meson.build diff --git a/test/TEST-09-REBOOT/meson.build b/test/integration-tests/TEST-09-REBOOT/meson.build similarity index 100% rename from test/TEST-09-REBOOT/meson.build rename to test/integration-tests/TEST-09-REBOOT/meson.build diff --git a/test/TEST-13-NSPAWN/meson.build b/test/integration-tests/TEST-13-NSPAWN/meson.build similarity index 100% rename from test/TEST-13-NSPAWN/meson.build rename to test/integration-tests/TEST-13-NSPAWN/meson.build diff --git a/test/TEST-19-CGROUP/meson.build b/test/integration-tests/TEST-15-DROPIN/meson.build similarity index 100% rename from test/TEST-19-CGROUP/meson.build rename to test/integration-tests/TEST-15-DROPIN/meson.build diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/extend-timeout.sh diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-runtime.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-runtime.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-runtime.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-runtime.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-start.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-start.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-start.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-start.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-stop.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-stop.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-stop.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/fail-stop.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-all.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-all.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-all.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-all.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-runtime.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-runtime.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-runtime.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-runtime.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-start.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-start.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-start.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-start.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-stop.service b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-stop.service similarity index 100% rename from test/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-stop.service rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units/success-stop.service diff --git a/test/TEST-16-EXTEND-TIMEOUT/meson.build b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/meson.build similarity index 78% rename from test/TEST-16-EXTEND-TIMEOUT/meson.build rename to test/integration-tests/TEST-16-EXTEND-TIMEOUT/meson.build index 2a06f9a151..e18b847471 100644 --- a/test/TEST-16-EXTEND-TIMEOUT/meson.build +++ b/test/integration-tests/TEST-16-EXTEND-TIMEOUT/meson.build @@ -7,5 +7,3 @@ integration_tests += [ 'coredump-exclude-regex' : '/(bash|sleep)$', }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-16-EXTEND-TIMEOUT.units'] diff --git a/test/TEST-17-UDEV/deny-list-ubuntu-ci-ppc64el b/test/integration-tests/TEST-17-UDEV/deny-list-ubuntu-ci-ppc64el similarity index 100% rename from test/TEST-17-UDEV/deny-list-ubuntu-ci-ppc64el rename to test/integration-tests/TEST-17-UDEV/deny-list-ubuntu-ci-ppc64el diff --git a/test/TEST-17-UDEV/meson.build b/test/integration-tests/TEST-17-UDEV/meson.build similarity index 100% rename from test/TEST-17-UDEV/meson.build rename to test/integration-tests/TEST-17-UDEV/meson.build diff --git a/test/TEST-18-FAILUREACTION/meson.build b/test/integration-tests/TEST-18-FAILUREACTION/meson.build similarity index 100% rename from test/TEST-18-FAILUREACTION/meson.build rename to test/integration-tests/TEST-18-FAILUREACTION/meson.build diff --git a/test/TEST-22-TMPFILES/meson.build b/test/integration-tests/TEST-19-CGROUP/meson.build similarity index 100% rename from test/TEST-22-TMPFILES/meson.build rename to test/integration-tests/TEST-19-CGROUP/meson.build diff --git a/test/TEST-21-DFUZZER/meson.build b/test/integration-tests/TEST-21-DFUZZER/meson.build similarity index 100% rename from test/TEST-21-DFUZZER/meson.build rename to test/integration-tests/TEST-21-DFUZZER/meson.build diff --git a/test/TEST-25-IMPORT/meson.build b/test/integration-tests/TEST-22-TMPFILES/meson.build similarity index 100% rename from test/TEST-25-IMPORT/meson.build rename to test/integration-tests/TEST-22-TMPFILES/meson.build diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-binds-to.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-binds-to.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-binds-to.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-binds-to.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-bound-by.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-bound-by.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-bound-by.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-bound-by.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-fail.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-fail.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-fail.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-fail.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-1.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-1.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-1.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-1.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-2.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-2.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-2.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-2.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-3.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-3.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-3.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-3.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-4.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-4.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-4.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-4.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-5.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-5.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-5.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-5.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-6.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-6.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-6.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-6.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-7.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-7.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-7.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-7.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-8.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-8.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-8.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-8.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-9.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-9.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-9.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-joins-namespace-of-9.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-namespaced.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-namespaced.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-namespaced.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-namespaced.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-non-namespaced.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-non-namespaced.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-non-namespaced.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-non-namespaced.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-oneshot-restartforce.sh b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-oneshot-restartforce.sh similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-oneshot-restartforce.sh rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-oneshot-restartforce.sh diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server.socket b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server.socket similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server.socket rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server.socket diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server@.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server@.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server@.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-openfile-server@.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-one.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-one.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-one.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-one.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-two.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-two.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-two.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-prop-stop-two.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-fail.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-fail.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-fail.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-fail.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-upheld.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-upheld.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-upheld.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-upheld.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-uphold.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-uphold.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-uphold.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-uphold.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-short-lived.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-short-lived.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-short-lived.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-short-lived.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-depends-wants.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-depends-wants.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-depends-wants.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-depends-wants.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-wants.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-wants.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-wants.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-specifier-j-wants.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-success.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-success.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-success.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-success.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-upheldby-install.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-upheldby-install.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-upheldby-install.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-upheldby-install.service diff --git a/test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-uphold.service b/test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-uphold.service similarity index 100% rename from test/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-uphold.service rename to test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-uphold.service diff --git a/test/TEST-26-SYSTEMCTL/meson.build b/test/integration-tests/TEST-23-UNIT-FILE/meson.build similarity index 100% rename from test/TEST-26-SYSTEMCTL/meson.build rename to test/integration-tests/TEST-23-UNIT-FILE/meson.build diff --git a/test/TEST-24-CRYPTSETUP/keydev.repart/00-root.conf b/test/integration-tests/TEST-24-CRYPTSETUP/keydev.repart/00-root.conf similarity index 100% rename from test/TEST-24-CRYPTSETUP/keydev.repart/00-root.conf rename to test/integration-tests/TEST-24-CRYPTSETUP/keydev.repart/00-root.conf diff --git a/test/TEST-24-CRYPTSETUP/keyfile b/test/integration-tests/TEST-24-CRYPTSETUP/keyfile similarity index 100% rename from test/TEST-24-CRYPTSETUP/keyfile rename to test/integration-tests/TEST-24-CRYPTSETUP/keyfile diff --git a/test/TEST-24-CRYPTSETUP/meson.build b/test/integration-tests/TEST-24-CRYPTSETUP/meson.build similarity index 87% rename from test/TEST-24-CRYPTSETUP/meson.build rename to test/integration-tests/TEST-24-CRYPTSETUP/meson.build index af41f161bf..4d65e1d9ab 100644 --- a/test/TEST-24-CRYPTSETUP/meson.build +++ b/test/integration-tests/TEST-24-CRYPTSETUP/meson.build @@ -15,8 +15,8 @@ integration_tests += [ 'luks.options=0d318174-56b0-4d6e-a324-ac1e7e7d235d=x-initrd.attach', ], 'qemu-args' : [ - '-drive', 'id=keydev,if=none,format=raw,cache=unsafe,file=@0@'.format(project_build_root / 'mkosi.output/keydev.raw'), - '-device', 'scsi-hd,drive=keydev', + '-drive', 'id=keydev,if=none,format=raw,cache=unsafe,file=@0@'.format(meson.project_build_root() / 'mkosi.output/keydev.raw'), + '-device', 'scsi-hd,drive=keydev,serial=keydev', ], 'mkosi-args' : integration_test_template['mkosi-args'] + [ '--runtime-size=11G', diff --git a/test/TEST-24-CRYPTSETUP/template.cfg b/test/integration-tests/TEST-24-CRYPTSETUP/template.cfg similarity index 100% rename from test/TEST-24-CRYPTSETUP/template.cfg rename to test/integration-tests/TEST-24-CRYPTSETUP/template.cfg diff --git a/test/TEST-34-DYNAMICUSERMIGRATE/meson.build b/test/integration-tests/TEST-25-IMPORT/meson.build similarity index 100% rename from test/TEST-34-DYNAMICUSERMIGRATE/meson.build rename to test/integration-tests/TEST-25-IMPORT/meson.build diff --git a/test/TEST-35-LOGIN/meson.build b/test/integration-tests/TEST-26-SYSTEMCTL/meson.build similarity index 100% rename from test/TEST-35-LOGIN/meson.build rename to test/integration-tests/TEST-26-SYSTEMCTL/meson.build diff --git a/test/TEST-29-PORTABLE/meson.build b/test/integration-tests/TEST-29-PORTABLE/meson.build similarity index 100% rename from test/TEST-29-PORTABLE/meson.build rename to test/integration-tests/TEST-29-PORTABLE/meson.build diff --git a/test/TEST-30-ONCLOCKCHANGE/TEST-30-ONCLOCKCHANGE.units/systemd-timedated.service.d/watchdog.conf b/test/integration-tests/TEST-30-ONCLOCKCHANGE/TEST-30-ONCLOCKCHANGE.units/systemd-timedated.service.d/watchdog.conf similarity index 100% rename from test/TEST-30-ONCLOCKCHANGE/TEST-30-ONCLOCKCHANGE.units/systemd-timedated.service.d/watchdog.conf rename to test/integration-tests/TEST-30-ONCLOCKCHANGE/TEST-30-ONCLOCKCHANGE.units/systemd-timedated.service.d/watchdog.conf diff --git a/test/TEST-31-DEVICE-ENUMERATION/meson.build b/test/integration-tests/TEST-30-ONCLOCKCHANGE/meson.build similarity index 100% rename from test/TEST-31-DEVICE-ENUMERATION/meson.build rename to test/integration-tests/TEST-30-ONCLOCKCHANGE/meson.build diff --git a/test/TEST-36-NUMAPOLICY/meson.build b/test/integration-tests/TEST-31-DEVICE-ENUMERATION/meson.build similarity index 100% rename from test/TEST-36-NUMAPOLICY/meson.build rename to test/integration-tests/TEST-31-DEVICE-ENUMERATION/meson.build diff --git a/test/TEST-32-OOMPOLICY/meson.build b/test/integration-tests/TEST-32-OOMPOLICY/meson.build similarity index 100% rename from test/TEST-32-OOMPOLICY/meson.build rename to test/integration-tests/TEST-32-OOMPOLICY/meson.build diff --git a/test/TEST-43-PRIVATEUSER-UNPRIV/meson.build b/test/integration-tests/TEST-34-DYNAMICUSERMIGRATE/meson.build similarity index 100% rename from test/TEST-43-PRIVATEUSER-UNPRIV/meson.build rename to test/integration-tests/TEST-34-DYNAMICUSERMIGRATE/meson.build diff --git a/test/TEST-45-TIMEDATE/meson.build b/test/integration-tests/TEST-35-LOGIN/meson.build similarity index 100% rename from test/TEST-45-TIMEDATE/meson.build rename to test/integration-tests/TEST-35-LOGIN/meson.build diff --git a/test/TEST-38-FREEZER/meson.build b/test/integration-tests/TEST-36-NUMAPOLICY/meson.build similarity index 100% rename from test/TEST-38-FREEZER/meson.build rename to test/integration-tests/TEST-36-NUMAPOLICY/meson.build diff --git a/test/TEST-50-DISSECT/meson.build b/test/integration-tests/TEST-38-FREEZER/meson.build similarity index 100% rename from test/TEST-50-DISSECT/meson.build rename to test/integration-tests/TEST-38-FREEZER/meson.build diff --git a/test/TEST-46-HOMED/meson.build b/test/integration-tests/TEST-43-PRIVATEUSER-UNPRIV/meson.build similarity index 100% rename from test/TEST-46-HOMED/meson.build rename to test/integration-tests/TEST-43-PRIVATEUSER-UNPRIV/meson.build diff --git a/test/TEST-44-LOG-NAMESPACE/TEST-44-LOG-NAMESPACE.service b/test/integration-tests/TEST-44-LOG-NAMESPACE/TEST-44-LOG-NAMESPACE.service similarity index 100% rename from test/TEST-44-LOG-NAMESPACE/TEST-44-LOG-NAMESPACE.service rename to test/integration-tests/TEST-44-LOG-NAMESPACE/TEST-44-LOG-NAMESPACE.service diff --git a/test/TEST-44-LOG-NAMESPACE/meson.build b/test/integration-tests/TEST-44-LOG-NAMESPACE/meson.build similarity index 100% rename from test/TEST-44-LOG-NAMESPACE/meson.build rename to test/integration-tests/TEST-44-LOG-NAMESPACE/meson.build diff --git a/test/TEST-60-MOUNT-RATELIMIT/meson.build b/test/integration-tests/TEST-45-TIMEDATE/meson.build similarity index 100% rename from test/TEST-60-MOUNT-RATELIMIT/meson.build rename to test/integration-tests/TEST-45-TIMEDATE/meson.build diff --git a/test/TEST-65-ANALYZE/meson.build b/test/integration-tests/TEST-46-HOMED/meson.build similarity index 100% rename from test/TEST-65-ANALYZE/meson.build rename to test/integration-tests/TEST-46-HOMED/meson.build diff --git a/test/TEST-58-REPART/meson.build b/test/integration-tests/TEST-50-DISSECT/meson.build similarity index 100% rename from test/TEST-58-REPART/meson.build rename to test/integration-tests/TEST-50-DISSECT/meson.build diff --git a/test/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.service b/test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.service similarity index 100% rename from test/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.service rename to test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.service diff --git a/test/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.sh b/test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.sh similarity index 100% rename from test/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.sh rename to test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.sh diff --git a/test/TEST-68-PROPAGATE-EXIT-STATUS/meson.build b/test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/meson.build similarity index 100% rename from test/TEST-68-PROPAGATE-EXIT-STATUS/meson.build rename to test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/meson.build diff --git a/test/TEST-53-ISSUE-16347/meson.build b/test/integration-tests/TEST-53-ISSUE-16347/meson.build similarity index 100% rename from test/TEST-53-ISSUE-16347/meson.build rename to test/integration-tests/TEST-53-ISSUE-16347/meson.build diff --git a/test/TEST-54-CREDS/meson.build b/test/integration-tests/TEST-54-CREDS/meson.build similarity index 100% rename from test/TEST-54-CREDS/meson.build rename to test/integration-tests/TEST-54-CREDS/meson.build diff --git a/test/TEST-54-CREDS/systemd.extra-unit.my-service.service b/test/integration-tests/TEST-54-CREDS/systemd.extra-unit.my-service.service similarity index 100% rename from test/TEST-54-CREDS/systemd.extra-unit.my-service.service rename to test/integration-tests/TEST-54-CREDS/systemd.extra-unit.my-service.service diff --git a/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service b/test/integration-tests/TEST-54-CREDS/systemd.unit-dropin.my-service.service similarity index 100% rename from test/TEST-54-CREDS/systemd.unit-dropin.my-service.service rename to test/integration-tests/TEST-54-CREDS/systemd.unit-dropin.my-service.service diff --git a/test/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service b/test/integration-tests/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service similarity index 100% rename from test/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service rename to test/integration-tests/TEST-54-CREDS/systemd.unit-dropin.my-service.service~30-named.service diff --git a/test/TEST-55-OOMD/meson.build b/test/integration-tests/TEST-55-OOMD/meson.build similarity index 100% rename from test/TEST-55-OOMD/meson.build rename to test/integration-tests/TEST-55-OOMD/meson.build diff --git a/test/TEST-55-OOMD/systemd.unit-dropin.init.scope b/test/integration-tests/TEST-55-OOMD/systemd.unit-dropin.init.scope similarity index 100% rename from test/TEST-55-OOMD/systemd.unit-dropin.init.scope rename to test/integration-tests/TEST-55-OOMD/systemd.unit-dropin.init.scope diff --git a/test/TEST-62-RESTRICT-IFACES/meson.build b/test/integration-tests/TEST-58-REPART/meson.build similarity index 100% rename from test/TEST-62-RESTRICT-IFACES/meson.build rename to test/integration-tests/TEST-58-REPART/meson.build diff --git a/test/TEST-59-RELOADING-RESTART/meson.build b/test/integration-tests/TEST-59-RELOADING-RESTART/meson.build similarity index 100% rename from test/TEST-59-RELOADING-RESTART/meson.build rename to test/integration-tests/TEST-59-RELOADING-RESTART/meson.build diff --git a/test/TEST-75-RESOLVED/meson.build b/test/integration-tests/TEST-60-MOUNT-RATELIMIT/meson.build similarity index 100% rename from test/TEST-75-RESOLVED/meson.build rename to test/integration-tests/TEST-60-MOUNT-RATELIMIT/meson.build diff --git a/test/TEST-66-DEVICE-ISOLATION/meson.build b/test/integration-tests/TEST-62-RESTRICT-IFACES/meson.build similarity index 100% rename from test/TEST-66-DEVICE-ISOLATION/meson.build rename to test/integration-tests/TEST-62-RESTRICT-IFACES/meson.build diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63.path b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63.path similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63.path rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63.path diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63.service b/test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63.service similarity index 100% rename from test/TEST-63-PATH/TEST-63-PATH.units/test63.service rename to test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63.service diff --git a/test/TEST-76-SYSCTL/meson.build b/test/integration-tests/TEST-63-PATH/meson.build similarity index 100% rename from test/TEST-76-SYSCTL/meson.build rename to test/integration-tests/TEST-63-PATH/meson.build diff --git a/test/TEST-64-UDEV-STORAGE/deny-list-ubuntu-ci b/test/integration-tests/TEST-64-UDEV-STORAGE/deny-list-ubuntu-ci similarity index 100% rename from test/TEST-64-UDEV-STORAGE/deny-list-ubuntu-ci rename to test/integration-tests/TEST-64-UDEV-STORAGE/deny-list-ubuntu-ci diff --git a/test/TEST-64-UDEV-STORAGE/meson.build b/test/integration-tests/TEST-64-UDEV-STORAGE/meson.build similarity index 57% rename from test/TEST-64-UDEV-STORAGE/meson.build rename to test/integration-tests/TEST-64-UDEV-STORAGE/meson.build index 6b4cc74fe5..cbd6b69777 100644 --- a/test/TEST-64-UDEV-STORAGE/meson.build +++ b/test/integration-tests/TEST-64-UDEV-STORAGE/meson.build @@ -1,17 +1,17 @@ # SPDX-License-Identifier: LGPL-2.1-or-later name = fs.name(meson.current_source_dir()) -unit = configure_file( - input : files('../test.service.in'), - output : '@0@.service'.format(name), - # Disable user service manager by default for performance. - configuration : integration_test_template['configuration'] + { - 'wants' : '', - 'after' : '', - }, -) - udev_storage_tests = [] +udev_storage_test_template = { + 'enabled' : true, +} + +qemu = find_program('qemu-system-@0@'.format(host_machine.cpu_family()), 'qemu-kvm', dirs : ['/usr/libexec'], native : true, required : false) +if qemu.found() + devices = run_command(qemu, '-device', 'help', check : true).stdout().strip() +else + devices = '' +endif cmdline = [] qemu_args = ['-device', 'virtio-scsi-pci,id=scsi0'] @@ -23,7 +23,7 @@ foreach i : range(4) qemu_args += ['-device', f'scsi-hd,drive=@id@,vendor=systemd,product=foobar,serial=deadbeefbtrfs@i@'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'btrfs_basic', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -39,7 +39,7 @@ foreach i : range(4) qemu_args += ['-device', f'scsi-hd,drive=@id@,vendor=systemd,product=foobar,serial=deadbeefiscsi@i@'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'iscsi_lvm', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -60,7 +60,7 @@ endforeach qemu_args += ['-device', 'virtio-blk-pci,drive=drive0,bus=pci_bridge25,addr=1,serial=long-sysfs-path'] -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'long_sysfs_path', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -75,7 +75,7 @@ foreach i : range(4) qemu_args += ['-device', f'scsi-hd,drive=@id@,vendor=systemd,product=foobar,serial=deadbeeflvm@i@'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'lvm_basic', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -90,7 +90,7 @@ foreach i : range(5) qemu_args += ['-device', f'scsi-hd,drive=@id@,vendor=systemd,product=foobar,serial=deadbeefmdadm@i@'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'mdadm_basic', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -105,7 +105,7 @@ foreach i : range(5) qemu_args += ['-device', f'scsi-hd,drive=@id@,vendor=systemd,product=foobar,serial=deadbeefmdadmlvm@i@'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'mdadm_lvm', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -127,7 +127,7 @@ foreach ndisk : range(16) endforeach endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'multipath_basic_failover', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -142,7 +142,7 @@ foreach i : range(10) qemu_args += ['-device', f'scsi-hd,drive=@id@,serial=deadbeeftest@i@'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'simultaneous_events', 'cmdline' : cmdline, 'qemu-args' : qemu_args, @@ -160,90 +160,84 @@ foreach i : range(128) cmdline += [f'--drive=@id@:1M::'] div = i / 32 mod = i % 32 - qemu_args += ['-device', f'scsi-hd,drive=@id@,bus=scsi@div@.0,channel=0,scsi-id=@mod@,lun=0'] + qemu_args += ['-device', f'scsi-hd,drive=@id@,serial=@id@,bus=scsi@div@.0,channel=0,scsi-id=@mod@,lun=0'] endforeach -udev_storage_tests += { +udev_storage_tests += udev_storage_test_template + { 'name' : 'virtio_scsi_basic', 'cmdline' : cmdline, 'qemu-args' : qemu_args, } -qemu = find_program('qemu-system-@0@'.format(host_machine.cpu_family()), 'qemu-kvm', dirs : ['/usr/libexec'], native : true, required : false) -if qemu.found() - devices = run_command(qemu, '-device', 'help', check : true).stdout().strip() - if devices.contains('name "nvme"') - cmdline = [] - qemu_args = [] +cmdline = [] +qemu_args = [] - foreach i : range(20) - cmdline += [f'--drive=nvme@i@:1M::'] - endforeach +foreach i : range(20) + cmdline += [f'--drive=nvme@i@:1M::'] +endforeach - foreach i : range(5) - qemu_args += ['-device', f'nvme,drive=nvme@i@,serial=deadbeef@i@,max_ioqpairs=8'] - endforeach +foreach i : range(5) + qemu_args += ['-device', f'nvme,drive=nvme@i@,serial=deadbeef@i@,max_ioqpairs=8'] +endforeach - foreach i : range(5, 10) - qemu_args += ['-device', f'"nvme,drive=nvme@i@,serial= deadbeef @i@ ,max_ioqpairs=8"'] - endforeach +foreach i : range(5, 10) + qemu_args += ['-device', f'"nvme,drive=nvme@i@,serial= deadbeef @i@ ,max_ioqpairs=8"'] +endforeach - foreach i : range(10, 15) - qemu_args += ['-device', f'"nvme,drive=nvme@i@,serial= dead/beef/@i@ ,max_ioqpairs=8"'] - endforeach +foreach i : range(10, 15) + qemu_args += ['-device', f'"nvme,drive=nvme@i@,serial= dead/beef/@i@ ,max_ioqpairs=8"'] +endforeach - foreach i : range(15, 20) - qemu_args += ['-device', f'"nvme,drive=nvme@i@,serial=dead/../../beef/@i@,max_ioqpairs=8"'] - endforeach +foreach i : range(15, 20) + qemu_args += ['-device', f'"nvme,drive=nvme@i@,serial=dead/../../beef/@i@,max_ioqpairs=8"'] +endforeach - udev_storage_tests += { - 'name' : 'nvme_basic', - 'cmdline' : cmdline, - 'qemu-args' : qemu_args, - } +udev_storage_tests += udev_storage_test_template + { + 'name' : 'nvme_basic', + 'cmdline' : cmdline, + 'qemu-args' : qemu_args, + 'enabled' : devices.contains('name "nvme"'), +} - cmdline = [] +cmdline = [] - foreach id : ['nvme0', 'nvme1'] - cmdline += [f'--drive=@id@:1M::'] - endforeach +foreach id : ['nvme0', 'nvme1'] + cmdline += [f'--drive=@id@:1M::'] +endforeach - qemu_args = [ - # Create an NVM Subsystem Device - '-device', 'nvme-subsys,id=nvme-subsys-64,nqn=subsys64', - # Attach two NVM controllers to it - '-device', 'nvme,subsys=nvme-subsys-64,serial=deadbeef', - '-device', 'nvme,subsys=nvme-subsys-64,serial=deadbeef', - # And create two shared namespaces attached to both controllers - '-device', 'nvme-ns,drive=nvme0,nsid=16,shared=on', - '-device', 'nvme-ns,drive=nvme1,nsid=17,shared=on', - ] +qemu_args = [ + # Create an NVM Subsystem Device + '-device', 'nvme-subsys,id=nvme-subsys-64,nqn=subsys64', + # Attach two NVM controllers to it + '-device', 'nvme,subsys=nvme-subsys-64,serial=deadbeef', + '-device', 'nvme,subsys=nvme-subsys-64,serial=deadbeef', + # And create two shared namespaces attached to both controllers + '-device', 'nvme-ns,drive=nvme0,nsid=16,shared=on', + '-device', 'nvme-ns,drive=nvme1,nsid=17,shared=on', +] - udev_storage_tests += { - 'name' : 'nvme_subsystem', - 'cmdline' : cmdline, - 'qemu-args' : qemu_args, - } - endif +udev_storage_tests += udev_storage_test_template + { + 'name' : 'nvme_subsystem', + 'cmdline' : cmdline, + 'qemu-args' : qemu_args, + 'enabled' : devices.contains('name "nvme"'), +} - if devices.contains('name "virtio-scsi-pci"') - cmdline = [] - qemu_args = ['-device', 'virtio-scsi-pci,id=scsi0,num_queues=4'] +cmdline = [] +qemu_args = ['-device', 'virtio-scsi-pci,id=scsi0,num_queues=4'] - foreach i : range(16) - id = f'drive@i@' - cmdline += [f'--drive=@id@:40M::'] - qemu_args += ['-device', f'scsi-hd,drive=@id@,bus=scsi0.0,channel=0,scsi-id=0,lun=@i@'] - endforeach - - udev_storage_tests += { - 'name' : 'virtio_scsi_identically_named_partitions', - 'cmdline' : cmdline, - 'qemu-args' : qemu_args, - } - endif -endif +foreach i : range(16) + id = f'drive@i@' + cmdline += [f'--drive=@id@:40M::'] + qemu_args += ['-device', f'scsi-hd,drive=@id@,serial=@id@,bus=scsi0.0,channel=0,scsi-id=0,lun=@i@'] +endforeach +udev_storage_tests += udev_storage_test_template + { + 'name' : 'virtio_scsi_identically_named_partitions', + 'cmdline' : cmdline, + 'qemu-args' : qemu_args, + 'enabled' : devices.contains('name "virtio-scsi-pci"'), +} foreach testcase : udev_storage_tests qemu_args = ' '.join(testcase['qemu-args']) @@ -252,17 +246,22 @@ foreach testcase : udev_storage_tests integration_tests += [ integration_test_template + { 'name' : '@0@-@1@'.format(name, testcase['name']), - # Make sure the service is still named TEST-64-UDEV-STORAGE.service. - 'unit' : unit, - 'cmdline' : integration_test_template['cmdline'] + [ - 'systemd.setenv=TEST_FUNCTION_NAME=testcase_@0@'.format(testcase['name']) - ], + # Disable user service manager by default for performance. + 'configuration' : integration_test_template['configuration'] + { + 'wants' : '', + 'after' : '', + 'command' : f'/usr/lib/systemd/tests/testdata/units/@name@.sh', + 'env' : integration_test_template['configuration']['env'] + { + 'TEST_FUNCTION_NAME': 'testcase_@0@'.format(testcase['name']), + }, + }, 'mkosi-args' : integration_test_template['mkosi-args'] + cmdline, 'priority' : 10, 'vm' : true, # Suppress ASan error # 'multipathd[1820]: ==1820==ERROR: AddressSanitizer: Joining already joined thread, aborting.' - 'sanitizer-exclude-regex' : 'multipathd' + 'sanitizer-exclude-regex' : 'multipathd', + 'enabled' : testcase['enabled'], }, ] endforeach diff --git a/test/TEST-78-SIGQUEUE/meson.build b/test/integration-tests/TEST-65-ANALYZE/meson.build similarity index 100% rename from test/TEST-78-SIGQUEUE/meson.build rename to test/integration-tests/TEST-65-ANALYZE/meson.build diff --git a/test/TEST-67-INTEGRITY/meson.build b/test/integration-tests/TEST-66-DEVICE-ISOLATION/meson.build similarity index 100% rename from test/TEST-67-INTEGRITY/meson.build rename to test/integration-tests/TEST-66-DEVICE-ISOLATION/meson.build diff --git a/test/TEST-72-SYSUPDATE/meson.build b/test/integration-tests/TEST-67-INTEGRITY/meson.build similarity index 100% rename from test/TEST-72-SYSUPDATE/meson.build rename to test/integration-tests/TEST-67-INTEGRITY/meson.build diff --git a/test/TEST-81-GENERATORS/meson.build b/test/integration-tests/TEST-68-PROPAGATE-EXIT-STATUS/meson.build similarity index 100% rename from test/TEST-81-GENERATORS/meson.build rename to test/integration-tests/TEST-68-PROPAGATE-EXIT-STATUS/meson.build diff --git a/test/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service b/test/integration-tests/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service similarity index 100% rename from test/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service rename to test/integration-tests/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service diff --git a/test/TEST-69-SHUTDOWN/meson.build b/test/integration-tests/TEST-69-SHUTDOWN/meson.build similarity index 100% rename from test/TEST-69-SHUTDOWN/meson.build rename to test/integration-tests/TEST-69-SHUTDOWN/meson.build diff --git a/test/TEST-70-TPM2/meson.build b/test/integration-tests/TEST-70-TPM2/meson.build similarity index 100% rename from test/TEST-70-TPM2/meson.build rename to test/integration-tests/TEST-70-TPM2/meson.build diff --git a/test/TEST-71-HOSTNAME/meson.build b/test/integration-tests/TEST-71-HOSTNAME/meson.build similarity index 100% rename from test/TEST-71-HOSTNAME/meson.build rename to test/integration-tests/TEST-71-HOSTNAME/meson.build diff --git a/test/TEST-83-BTRFS/meson.build b/test/integration-tests/TEST-72-SYSUPDATE/meson.build similarity index 100% rename from test/TEST-83-BTRFS/meson.build rename to test/integration-tests/TEST-72-SYSUPDATE/meson.build diff --git a/test/TEST-73-LOCALE/meson.build b/test/integration-tests/TEST-73-LOCALE/meson.build similarity index 100% rename from test/TEST-73-LOCALE/meson.build rename to test/integration-tests/TEST-73-LOCALE/meson.build diff --git a/test/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.service b/test/integration-tests/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.service similarity index 100% rename from test/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.service rename to test/integration-tests/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.service diff --git a/test/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.timer b/test/integration-tests/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.timer similarity index 100% rename from test/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.timer rename to test/integration-tests/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units/realtime-test.timer diff --git a/test/TEST-74-AUX-UTILS/meson.build b/test/integration-tests/TEST-74-AUX-UTILS/meson.build similarity index 77% rename from test/TEST-74-AUX-UTILS/meson.build rename to test/integration-tests/TEST-74-AUX-UTILS/meson.build index 698d03b055..0db9fe974f 100644 --- a/test/TEST-74-AUX-UTILS/meson.build +++ b/test/integration-tests/TEST-74-AUX-UTILS/meson.build @@ -6,5 +6,3 @@ integration_tests += [ 'name' : fs.name(meson.current_source_dir()), }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-74-AUX-UTILS.units'] diff --git a/test/TEST-03-JOBS/meson.build b/test/integration-tests/TEST-75-RESOLVED/meson.build similarity index 71% rename from test/TEST-03-JOBS/meson.build rename to test/integration-tests/TEST-75-RESOLVED/meson.build index 3484d21ba2..8dec5f37e7 100644 --- a/test/TEST-03-JOBS/meson.build +++ b/test/integration-tests/TEST-75-RESOLVED/meson.build @@ -5,5 +5,3 @@ integration_tests += [ 'name' : fs.name(meson.current_source_dir()), }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-03-JOBS.units'] diff --git a/test/TEST-63-PATH/meson.build b/test/integration-tests/TEST-76-SYSCTL/meson.build similarity index 71% rename from test/TEST-63-PATH/meson.build rename to test/integration-tests/TEST-76-SYSCTL/meson.build index 4aa3afdf7a..8dec5f37e7 100644 --- a/test/TEST-63-PATH/meson.build +++ b/test/integration-tests/TEST-76-SYSCTL/meson.build @@ -5,5 +5,3 @@ integration_tests += [ 'name' : fs.name(meson.current_source_dir()), }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-63-PATH.units'] diff --git a/test/TEST-23-UNIT-FILE/meson.build b/test/integration-tests/TEST-78-SIGQUEUE/meson.build similarity index 70% rename from test/TEST-23-UNIT-FILE/meson.build rename to test/integration-tests/TEST-78-SIGQUEUE/meson.build index 3f44662ae3..8dec5f37e7 100644 --- a/test/TEST-23-UNIT-FILE/meson.build +++ b/test/integration-tests/TEST-78-SIGQUEUE/meson.build @@ -5,5 +5,3 @@ integration_tests += [ 'name' : fs.name(meson.current_source_dir()), }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-23-UNIT-FILE.units'] diff --git a/test/TEST-79-MEMPRESS/meson.build b/test/integration-tests/TEST-79-MEMPRESS/meson.build similarity index 100% rename from test/TEST-79-MEMPRESS/meson.build rename to test/integration-tests/TEST-79-MEMPRESS/meson.build diff --git a/test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-nopin.service b/test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-nopin.service similarity index 100% rename from test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-nopin.service rename to test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-nopin.service diff --git a/test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.service b/test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.service similarity index 100% rename from test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.service rename to test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.service diff --git a/test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.sh b/test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.sh similarity index 100% rename from test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.sh rename to test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.sh diff --git a/test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.target b/test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.target similarity index 100% rename from test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.target rename to test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/fdstore-pin.target diff --git a/test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/notify.service b/test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/notify.service similarity index 100% rename from test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/notify.service rename to test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/notify.service diff --git a/test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/test.sh b/test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/test.sh similarity index 100% rename from test/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/test.sh rename to test/integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units/test.sh diff --git a/test/TEST-80-NOTIFYACCESS/meson.build b/test/integration-tests/TEST-80-NOTIFYACCESS/meson.build similarity index 69% rename from test/TEST-80-NOTIFYACCESS/meson.build rename to test/integration-tests/TEST-80-NOTIFYACCESS/meson.build index f78c6fd732..8dec5f37e7 100644 --- a/test/TEST-80-NOTIFYACCESS/meson.build +++ b/test/integration-tests/TEST-80-NOTIFYACCESS/meson.build @@ -5,5 +5,3 @@ integration_tests += [ 'name' : fs.name(meson.current_source_dir()), }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-80-NOTIFYACCESS.units'] diff --git a/test/integration-tests/TEST-81-GENERATORS/meson.build b/test/integration-tests/TEST-81-GENERATORS/meson.build new file mode 100644 index 0000000000..8dec5f37e7 --- /dev/null +++ b/test/integration-tests/TEST-81-GENERATORS/meson.build @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +integration_tests += [ + integration_test_template + { + 'name' : fs.name(meson.current_source_dir()), + }, +] diff --git a/test/TEST-82-SOFTREBOOT/TEST-82-SOFTREBOOT.service b/test/integration-tests/TEST-82-SOFTREBOOT/TEST-82-SOFTREBOOT.service similarity index 100% rename from test/TEST-82-SOFTREBOOT/TEST-82-SOFTREBOOT.service rename to test/integration-tests/TEST-82-SOFTREBOOT/TEST-82-SOFTREBOOT.service diff --git a/test/TEST-82-SOFTREBOOT/meson.build b/test/integration-tests/TEST-82-SOFTREBOOT/meson.build similarity index 100% rename from test/TEST-82-SOFTREBOOT/meson.build rename to test/integration-tests/TEST-82-SOFTREBOOT/meson.build diff --git a/test/TEST-84-STORAGETM/meson.build b/test/integration-tests/TEST-83-BTRFS/meson.build similarity index 100% rename from test/TEST-84-STORAGETM/meson.build rename to test/integration-tests/TEST-83-BTRFS/meson.build diff --git a/test/TEST-30-ONCLOCKCHANGE/meson.build b/test/integration-tests/TEST-84-STORAGETM/meson.build similarity index 72% rename from test/TEST-30-ONCLOCKCHANGE/meson.build rename to test/integration-tests/TEST-84-STORAGETM/meson.build index cd0f1f6574..77370ce458 100644 --- a/test/TEST-30-ONCLOCKCHANGE/meson.build +++ b/test/integration-tests/TEST-84-STORAGETM/meson.build @@ -6,5 +6,3 @@ integration_tests += [ 'vm' : true, }, ] - -testdata_subdirs += [meson.current_source_dir() / 'TEST-30-ONCLOCKCHANGE.units'] diff --git a/test/integration-tests/TEST-85-NETWORK/meson.build b/test/integration-tests/TEST-85-NETWORK/meson.build new file mode 100644 index 0000000000..7bce51abbe --- /dev/null +++ b/test/integration-tests/TEST-85-NETWORK/meson.build @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +name = fs.name(meson.current_source_dir()) + +foreach testcase : [ + 'NetworkctlTests', + 'NetworkdMatchTests', + 'WaitOnlineTests', + 'NetworkdNetDevTests', + 'NetworkdL2TPTests', + 'NetworkdNetworkTests', + 'NetworkdTCTests', + 'NetworkdStateFileTests', + 'NetworkdBondTests', + 'NetworkdBridgeTests', + 'NetworkdSRIOVTests', + 'NetworkdLLDPTests', + 'NetworkdRATests', + 'NetworkdDHCPServerTests', + 'NetworkdDHCPServerRelayAgentTests', + 'NetworkdDHCPClientTests', + 'NetworkdDHCPPDTests', + 'NetworkdIPv6PrefixTests', + 'NetworkdMTUTests', +] + integration_tests += [ + integration_test_template + { + 'name' : '@0@-@1@'.format(name, testcase), + 'configuration' : integration_test_template['configuration'] + { + 'command' : '/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py --no-journal', + 'env' : integration_test_template['configuration']['env'] + { + 'TEST_MATCH_TESTCASE': testcase, + } + }, + 'priority' : 10, + 'vm' : true, + }, + ] +endforeach diff --git a/test/TEST-86-MULTI-PROFILE-UKI/meson.build b/test/integration-tests/TEST-86-MULTI-PROFILE-UKI/meson.build similarity index 100% rename from test/TEST-86-MULTI-PROFILE-UKI/meson.build rename to test/integration-tests/TEST-86-MULTI-PROFILE-UKI/meson.build diff --git a/test/TEST-87-AUX-UTILS-VM/meson.build b/test/integration-tests/TEST-87-AUX-UTILS-VM/meson.build similarity index 100% rename from test/TEST-87-AUX-UTILS-VM/meson.build rename to test/integration-tests/TEST-87-AUX-UTILS-VM/meson.build diff --git a/test/integration-test-wrapper.py b/test/integration-tests/integration-test-wrapper.py similarity index 100% rename from test/integration-test-wrapper.py rename to test/integration-tests/integration-test-wrapper.py diff --git a/test/integration-tests/integration-tests b/test/integration-tests/integration-tests new file mode 120000 index 0000000000..a96aa0ea9d --- /dev/null +++ b/test/integration-tests/integration-tests @@ -0,0 +1 @@ +.. \ No newline at end of file diff --git a/test/integration-tests/meson.build b/test/integration-tests/meson.build new file mode 100644 index 0000000000..ecf3df7f09 --- /dev/null +++ b/test/integration-tests/meson.build @@ -0,0 +1,172 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +integration_test_wrapper = find_program('integration-test-wrapper.py') +integration_tests = [] +integration_test_template = { + 'mkosi-args' : [], + 'timeout' : 1800, + 'storage' : 'volatile', + 'priority' : 0, + 'firmware' : 'linux', + 'enabled' : true, + 'configuration' : { + 'memory-accounting' : 'no', + 'command' : '/usr/lib/systemd/tests/testdata/units/%N.sh', + 'wants' : 'multi-user.target user@4711.service', + 'after' : 'user@4711.service', + 'env' : {}, + }, + 'cmdline' : [], + 'credentials' : [], + 'qemu-args' : [], + 'exit-code' : 123, + 'vm' : false, + 'coredump-exclude-regex' : '', + 'sanitizer-exclude-regex' : '', + 'rtc' : false, +} + +foreach dirname : [ + 'TEST-01-BASIC', + 'TEST-02-UNITTESTS', + 'TEST-03-JOBS', + 'TEST-04-JOURNAL', + 'TEST-05-RLIMITS', + 'TEST-06-SELINUX', + 'TEST-07-PID1', + 'TEST-08-INITRD', + 'TEST-09-REBOOT', + 'TEST-13-NSPAWN', + 'TEST-15-DROPIN', + 'TEST-16-EXTEND-TIMEOUT', + 'TEST-17-UDEV', + 'TEST-18-FAILUREACTION', + 'TEST-19-CGROUP', + 'TEST-21-DFUZZER', + 'TEST-22-TMPFILES', + 'TEST-23-UNIT-FILE', + 'TEST-24-CRYPTSETUP', + 'TEST-25-IMPORT', + 'TEST-26-SYSTEMCTL', + 'TEST-29-PORTABLE', + 'TEST-30-ONCLOCKCHANGE', + 'TEST-31-DEVICE-ENUMERATION', + 'TEST-32-OOMPOLICY', + 'TEST-34-DYNAMICUSERMIGRATE', + 'TEST-35-LOGIN', + 'TEST-36-NUMAPOLICY', + 'TEST-38-FREEZER', + 'TEST-43-PRIVATEUSER-UNPRIV', + 'TEST-44-LOG-NAMESPACE', + 'TEST-45-TIMEDATE', + 'TEST-46-HOMED', + 'TEST-50-DISSECT', + 'TEST-52-HONORFIRSTSHUTDOWN', + 'TEST-53-ISSUE-16347', + 'TEST-54-CREDS', + 'TEST-55-OOMD', + 'TEST-58-REPART', + 'TEST-59-RELOADING-RESTART', + 'TEST-60-MOUNT-RATELIMIT', + 'TEST-62-RESTRICT-IFACES', + 'TEST-63-PATH', + 'TEST-64-UDEV-STORAGE', + 'TEST-65-ANALYZE', + 'TEST-66-DEVICE-ISOLATION', + 'TEST-67-INTEGRITY', + 'TEST-68-PROPAGATE-EXIT-STATUS', + 'TEST-69-SHUTDOWN', + 'TEST-70-TPM2', + 'TEST-71-HOSTNAME', + 'TEST-72-SYSUPDATE', + 'TEST-73-LOCALE', + 'TEST-74-AUX-UTILS', + 'TEST-75-RESOLVED', + 'TEST-76-SYSCTL', + 'TEST-78-SIGQUEUE', + 'TEST-79-MEMPRESS', + 'TEST-80-NOTIFYACCESS', + 'TEST-81-GENERATORS', + 'TEST-82-SOFTREBOOT', + 'TEST-83-BTRFS', + 'TEST-84-STORAGETM', + 'TEST-85-NETWORK', + 'TEST-86-MULTI-PROFILE-UKI', + 'TEST-87-AUX-UTILS-VM', +] + subdir(dirname) +endforeach + +foreach integration_test : integration_tests + integration_test_args = [ + # We don't use meson.project_source_root() because that doesn't work for running the tests + # standalone (see standalone/meson.build). + '--meson-source-dir', meson.current_source_dir() / '../..', + '--meson-build-dir', meson.project_build_root(), + '--name', integration_test['name'], + '--storage', integration_test['storage'], + '--firmware', integration_test['firmware'], + '--exit-code', integration_test['exit-code'].to_string(), + '--coredump-exclude-regex', integration_test['coredump-exclude-regex'], + '--sanitizer-exclude-regex', integration_test['sanitizer-exclude-regex'], + ] + + if 'unit' in integration_test + integration_test_args += ['--unit', fs.name(integration_test['unit'])] + else + integration_test_args += ['--unit', '@0@.service'.format(integration_test['name'])] + endif + + if integration_test['vm'] + integration_test_args += ['--vm'] + endif + + if integration_test['rtc'] + integration_test_args += ['--rtc'] + endif + + if not mkosi.found() + continue + endif + + integration_test_args += ['--mkosi', mkosi.full_path(), '--'] + + if integration_test['cmdline'].length() > 0 + integration_test_args += [ + '--kernel-command-line-extra=@0@'.format(' '.join(integration_test['cmdline'])) + ] + endif + + foreach credential : integration_test['credentials'] + integration_test_args += ['--credential', credential] + endforeach + + if integration_test['qemu-args'].length() > 0 + integration_test_args += ['--qemu-args=@0@'.format(' '.join(integration_test['qemu-args']))] + endif + + integration_test_args += integration_test['mkosi-args'] + + integration_test_env = {} + + if want_integration_tests + integration_test_env += {'SYSTEMD_INTEGRATION_TESTS': '1'} + endif + + if not integration_test['enabled'] + continue + endif + + # We don't explicitly depend on the "mkosi" target because that means the image is rebuilt on every + # "ninja -C build". Instead, the mkosi target has to be rebuilt manually before running the + # integration tests with mkosi. + test( + integration_test['name'], + integration_test_wrapper, + env : integration_test_env, + args : integration_test_args, + timeout : integration_test['timeout'], + priority : integration_test['priority'], + suite : 'integration-tests', + ) +endforeach diff --git a/test/integration-tests/standalone/meson.build b/test/integration-tests/standalone/meson.build new file mode 100644 index 0000000000..76d11afcec --- /dev/null +++ b/test/integration-tests/standalone/meson.build @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +# This meson file can be used to run the integration tests without having to install any other dependencies +# as follows: +# +# mkosi -f sandbox -- meson setup testsuite test/integration-tests/standalone +# mkosi genkey +# mkosi -f +# mkosi sandbox -- meson test -C testsuite +# +project('systemd-testsuite', + version : files('../../../meson.version'), + license : 'LGPLv2+', + default_options: ['warning_level=2'], + meson_version : '>= 0.62.0', +) + +fs = import('fs') +mkosi = find_program('mkosi', required : true) +want_integration_tests = true + +# meson refuses .. in subdir() so we use a symlink to trick it into accepting it anyway. +subdir('integration-tests') diff --git a/test/meson.build b/test/meson.build index e2d10a3886..9ec9e515e9 100644 --- a/test/meson.build +++ b/test/meson.build @@ -220,7 +220,7 @@ if rpm.found() and rpmspec.found() test('test-rpm-macros', test_rpm_macros, suite : 'dist', - args : [project_build_root]) + args : [meson.project_build_root()]) endif else message('Skipping test-rpm-macros since rpm and/or rpmspec are not available') @@ -232,20 +232,20 @@ if want_tests != 'false' and conf.get('HAVE_DMI') == 1 udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh') exe = executables_by_name.get('dmi_memory_id') - if git.found() and fs.is_dir(project_source_root / '.git') + if git.found() and fs.is_dir(meson.project_source_root() / '.git') out = run_command( env, '-u', 'GIT_WORK_TREE', - git, '--git-dir=@0@/.git'.format(project_source_root), + git, '--git-dir=@0@/.git'.format(meson.project_source_root()), 'ls-files', ':/test/dmidecode-dumps/*.bin', check: true) else out = run_command( - sh, '-c', 'cd "$1"; echo test/dmidecode-dumps/*.bin', '_', project_source_root, + sh, '-c', 'cd "$1"; echo test/dmidecode-dumps/*.bin', '_', meson.project_source_root(), check: true) endif foreach p : out.stdout().split() - source = project_source_root / p + source = meson.project_source_root() / p test('dmidecode_' + fs.stem(p), udev_dmi_memory_id_test, suite : 'udev', @@ -278,30 +278,34 @@ endif ############################################################ if want_tests != 'false' - integration_test_wrapper = find_program('integration-test-wrapper.py') - integration_tests = [] - integration_test_template = { - 'mkosi-args' : [], - 'timeout' : 1800, - 'storage' : 'volatile', - 'priority' : 0, - 'firmware' : 'linux', - 'enabled' : true, - 'configuration' : { - 'memory-accounting' : 'no', - 'command' : testdata_dir / 'units/%N.sh', - 'wants' : 'multi-user.target user@4711.service', - 'after' : 'user@4711.service', - }, - 'cmdline' : [], - 'credentials' : [], - 'qemu-args' : [], - 'exit-code' : 123, - 'vm' : false, - 'coredump-exclude-regex' : '', - 'sanitizer-exclude-regex' : '', - 'rtc' : false, - } + subdir('integration-tests') +endif + +if install_tests + foreach integration_test : integration_tests + if 'unit' in integration_test + integration_test_unit = integration_test['unit'] + else + integration_test_unit_env = [] + + foreach key, value : integration_test['configuration']['env'] + integration_test_unit_env += [f'@key@=@value@'] + endforeach + + integration_test_unit = configure_file( + input : 'test.service.in', + output : '@0@.service'.format(integration_test['name']), + configuration : integration_test['configuration'] + { + 'env' : ' '.join(integration_test_unit_env) + }, + ) + endif + + if install_tests + install_data(integration_test_unit, install_dir : testdata_dir / 'units') + endif + endforeach + testdata_subdirs = [ 'auxv', 'journal-data', @@ -315,162 +319,19 @@ if want_tests != 'false' 'test-umount', 'test-network', 'test-network-generator-conversion', + 'integration-tests/TEST-07-PID1/TEST-07-PID1.units', + 'integration-tests/TEST-03-JOBS/TEST-03-JOBS.units', + 'integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units', + 'integration-tests/TEST-06-SELINUX/TEST-06-SELINUX.units', + 'integration-tests/TEST-16-EXTEND-TIMEOUT/TEST-16-EXTEND-TIMEOUT.units', + 'integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units', + 'integration-tests/TEST-30-ONCLOCKCHANGE/TEST-30-ONCLOCKCHANGE.units', + 'integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units', + 'integration-tests/TEST-63-PATH/TEST-63-PATH.units', + 'integration-tests/TEST-74-AUX-UTILS/TEST-74-AUX-UTILS.units', + 'integration-tests/TEST-80-NOTIFYACCESS/TEST-80-NOTIFYACCESS.units', ] - foreach dirname : [ - 'TEST-01-BASIC', - 'TEST-02-UNITTESTS', - 'TEST-03-JOBS', - 'TEST-04-JOURNAL', - 'TEST-05-RLIMITS', - 'TEST-06-SELINUX', - 'TEST-07-PID1', - 'TEST-08-INITRD', - 'TEST-09-REBOOT', - 'TEST-13-NSPAWN', - 'TEST-15-DROPIN', - 'TEST-16-EXTEND-TIMEOUT', - 'TEST-17-UDEV', - 'TEST-18-FAILUREACTION', - 'TEST-19-CGROUP', - 'TEST-21-DFUZZER', - 'TEST-22-TMPFILES', - 'TEST-23-UNIT-FILE', - 'TEST-24-CRYPTSETUP', - 'TEST-25-IMPORT', - 'TEST-26-SYSTEMCTL', - 'TEST-29-PORTABLE', - 'TEST-30-ONCLOCKCHANGE', - 'TEST-31-DEVICE-ENUMERATION', - 'TEST-32-OOMPOLICY', - 'TEST-34-DYNAMICUSERMIGRATE', - 'TEST-35-LOGIN', - 'TEST-36-NUMAPOLICY', - 'TEST-38-FREEZER', - 'TEST-43-PRIVATEUSER-UNPRIV', - 'TEST-44-LOG-NAMESPACE', - 'TEST-45-TIMEDATE', - 'TEST-46-HOMED', - 'TEST-50-DISSECT', - 'TEST-52-HONORFIRSTSHUTDOWN', - 'TEST-53-ISSUE-16347', - 'TEST-54-CREDS', - 'TEST-55-OOMD', - 'TEST-58-REPART', - 'TEST-59-RELOADING-RESTART', - 'TEST-60-MOUNT-RATELIMIT', - 'TEST-62-RESTRICT-IFACES', - 'TEST-63-PATH', - 'TEST-64-UDEV-STORAGE', - 'TEST-65-ANALYZE', - 'TEST-66-DEVICE-ISOLATION', - 'TEST-67-INTEGRITY', - 'TEST-68-PROPAGATE-EXIT-STATUS', - 'TEST-69-SHUTDOWN', - 'TEST-70-TPM2', - 'TEST-71-HOSTNAME', - 'TEST-72-SYSUPDATE', - 'TEST-73-LOCALE', - 'TEST-74-AUX-UTILS', - 'TEST-75-RESOLVED', - 'TEST-76-SYSCTL', - 'TEST-78-SIGQUEUE', - 'TEST-79-MEMPRESS', - 'TEST-80-NOTIFYACCESS', - 'TEST-81-GENERATORS', - 'TEST-82-SOFTREBOOT', - 'TEST-83-BTRFS', - 'TEST-84-STORAGETM', - 'TEST-85-NETWORK', - 'TEST-86-MULTI-PROFILE-UKI', - 'TEST-87-AUX-UTILS-VM', - ] - subdir(dirname) - endforeach - - foreach integration_test : integration_tests - integration_test_args = [ - '--meson-source-dir', meson.project_source_root(), - '--meson-build-dir', meson.project_build_root(), - '--name', integration_test['name'], - '--storage', integration_test['storage'], - '--firmware', integration_test['firmware'], - '--exit-code', integration_test['exit-code'].to_string(), - '--coredump-exclude-regex', integration_test['coredump-exclude-regex'], - '--sanitizer-exclude-regex', integration_test['sanitizer-exclude-regex'], - ] - - if 'unit' in integration_test - integration_test_unit = integration_test['unit'] - else - integration_test_unit = configure_file( - input : 'test.service.in', - output : '@0@.service'.format(integration_test['name']), - configuration : integration_test['configuration'], - ) - endif - - integration_test_args += ['--unit', fs.name(integration_test_unit)] - if install_tests - install_data(integration_test_unit, install_dir : testdata_dir / 'units') - endif - - if integration_test['vm'] - integration_test_args += ['--vm'] - endif - - if integration_test['rtc'] - integration_test_args += ['--rtc'] - endif - - if not mkosi.found() - continue - endif - - integration_test_args += ['--mkosi', mkosi.full_path(), '--'] - - if integration_test['cmdline'].length() > 0 - integration_test_args += [ - '--kernel-command-line-extra=@0@'.format(' '.join(integration_test['cmdline'])) - ] - endif - - foreach credential : integration_test['credentials'] - integration_test_args += ['--credential', credential] - endforeach - - if integration_test['qemu-args'].length() > 0 - integration_test_args += ['--qemu-args=@0@'.format(' '.join(integration_test['qemu-args']))] - endif - - integration_test_args += integration_test['mkosi-args'] - - integration_test_env = {} - - if want_integration_tests - integration_test_env += {'SYSTEMD_INTEGRATION_TESTS': '1'} - endif - - if not integration_test['enabled'] - continue - endif - - # We don't explicitly depend on the "mkosi" target because that means the image is rebuilt on every - # "ninja -C build". Instead, the mkosi target has to be rebuilt manually before running the - # integration tests with mkosi. - test( - integration_test['name'], - integration_test_wrapper, - env : integration_test_env, - args : integration_test_args, - timeout : integration_test['timeout'], - priority : integration_test['priority'], - suite : 'integration-tests', - ) - endforeach -endif - -if install_tests foreach subdir : testdata_subdirs # install_subdir() before meson 1.3.0 does not handle symlinks correctly (it follows them # instead of copying the symlink) so we use rsync instead. diff --git a/test/test.service.in b/test/test.service.in index 0c3bd28c6b..223df0399a 100644 --- a/test/test.service.in +++ b/test/test.service.in @@ -9,4 +9,4 @@ ExecStartPre=rm -f /failed /testok ExecStart=@command@ Type=oneshot MemoryAccounting=@memory-accounting@ -Environment=SYSTEMD_PAGER= +Environment=SYSTEMD_PAGER= @env@ diff --git a/test/units/util.sh b/test/units/util.sh index 1f903b3293..bc3c1651a7 100755 --- a/test/units/util.sh +++ b/test/units/util.sh @@ -160,7 +160,6 @@ coverage_create_nspawn_dropin() { # If we're collecting coverage, bind mount the $BUILD_DIR into the nspawn # container so gcov can update the counters. This is mostly for standalone # containers, as machinectl stuff is handled by overriding the systemd-nspawn@.service - # (see test/test-functions:install_systemd()) local root="${1:?}" local container