summaryrefslogtreecommitdiffstats
path: root/test/meson.build (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ci: add testcase for multi-profile UKIsLennart Poettering2024-09-171-0/+1
| | | | | | | | | | | | This tests the whole shebang: 1. That ukify can generate them properly 2. That systemd-boot can dissect them properly 3. That systemd-stub can accept profile selection propery 4. That the profile information ends up in /run/systemd/stub/ properly 5. That systemd-measure correctly calculates the expected PCR 11 values for each profile and that we can unlock a public-key bound LUKS volume with it
* test: Add a way to quickly iterate on an integration testDaan De Meyer2024-08-051-3/+5
| | | | | | | | | | | | | Rebuilding the integration test every time is very slow. Let's introduce a way to iterate on an integration test without rebuilding the image every time. By making a btrfs snapshot before we run the integration test, we can then systemctl soft-reboot after running the test to restore the rootfs to a pristine state before running the test again. As /run/nextroot will get nuked on reboot or soft-reboot, we introduce a tmpfiles snippet to make sure it is recreated every (soft-)reboot and adapt the existing tests to deal with this new symlink.
* Merge pull request #33105 from DaanDeMeyer/sanitizersDaan De Meyer2024-05-311-9/+0
|\ | | | | Sanitizers
| * TEST-21-DFUZZER: Stop marking as slowDaan De Meyer2024-05-311-9/+0
| | | | | | | | | | | | This was a workaround to not run TEST-21-DFUZZER without sanitizers. Now that we're going to get sanitizer support, let's run it by default again.
* | test: optionally allow to disable user service manager, and disable it on ↵Yu Watanabe2024-05-311-2/+2
|/ | | | | | | TEST-64 The test triggers many uevents, and running both system and user service managers make the test slow.
* test: Run tests that don't need a vm in systemd-nspawnDaan De Meyer2024-05-291-0/+5
| | | | | If we're not running the test as root, stick to using a virtual machine, as mkosi can't do rootless nspawn yet.
* meson: Look up mkosi onceDaan De Meyer2024-05-271-1/+5
|
* test: Enable TEST-08-INITRD on mkosiDaan De Meyer2024-05-151-0/+2
|
* Merge pull request #32666 from DaanDeMeyer/mkosi-networkDaan De Meyer2024-05-151-0/+1
|\ | | | | test: Add TEST-85-NETWORK to run systemd-networkd-tests.py
| * test: Add TEST-85-NETWORK to run systemd-networkd-tests.pyDaan De Meyer2024-05-141-0/+1
| | | | | | | | | | | | | | This adds a testsuite unit to run systemd-networkd-tests.py. This is mkosi only for now as python is not available in the images set up by the bash framework. We give the test a lower priority as it takes a while to run so we want to start it as soon as possible.
* | test: Enable TEST-54-CREDS on mkosiDaan De Meyer2024-05-141-0/+10
|/
* test: Only add tpm2.target dependency to TEST-70-TPM2.serviceDaan De Meyer2024-05-141-0/+2
| | | | Let's not add the dependency unless required.
* test: Add cmdline field to configure extra kernel command line argsDaan De Meyer2024-05-141-1/+10
| | | | | Configuring extra cmdline arguments as a list is much nicer than having to pass the --kernel-command-line-extra argument manually.
* test: Generate basic testsuite services with mesonDaan De Meyer2024-05-141-0/+19
| | | | | Most of these are identical, let's just generate from a meson template.
* test: Rename mkosi_args to mkosi-argsDaan De Meyer2024-05-141-2/+2
|
* test: Disable tests via 'enabled' fieldDaan De Meyer2024-05-141-6/+11
| | | | | This allows doing other stuff with the test without actually defining the test, such as generating a service unit automatically.
* test: Simplify argument/variable namesDaan De Meyer2024-05-141-1/+1
|
* test: Rename testsuite-XX units to match test nameDaan De Meyer2024-05-141-73/+59
| | | | | | | Having these named differently than the test itself mostly creates unecessary confusion and makes writing logic against the tests harder so let's rename the testsuite-xx units and scripts to just use the test name itself.
* test: Rework integration test definitionsDaan De Meyer2024-05-141-98/+99
| | | | | | | Let's make this behave more like all the rest of the meson stuff. This also is the first step to making it a bit more flexible so we can define integration tests in different ways as will be seen in the next commits.
* test: Add infra to mark integration tests as slowDaan De Meyer2024-05-071-3/+13
| | | | | | Some integration tests take much more time than others, let's add a test param that can be used to configure this and integrate it with the slow-tests meson option.
* mkosi: Enable more integration testsDaan De Meyer2024-05-061-13/+13
|
* test: Default to linux qemu firmwareDaan De Meyer2024-05-061-0/+2
| | | | | | | | | | Direct kernel boot results in much faster boot times so let's use it by default. We disable it for tests that need to reboot because +-50% of the time, doing a reboot when using direct kernel boot causes qemu to hang on reboot. Until we figure that out, let's use UEFI for the tests that need to reboot.
* TEST-75-RESOLVED: Move knot configuration to /usr/lib/systemd/tests/testdataDaan De Meyer2024-05-061-0/+1
| | | | | This allows the logic to install the configuration to be done inside the test itself which allows it to be shared with mkosi.
* TEST-21-DFUZZER: Give higher priorityDaan De Meyer2024-05-061-0/+2
| | | | | | This test takes a long time to run. Let's make sure it is started first to avoid it being the only test running for a long time at the end.
* test: Fix udev storage test nameDaan De Meyer2024-05-061-1/+1
|
* test: Add missing TEST-69-SHUTDOWN to listDaan De Meyer2024-05-061-0/+1
|
* test: Remove flaky test commentsDaan De Meyer2024-05-061-2/+1
| | | | | These two tests don't seem to fail in CI, so let's remove the comments about flakyness.
* test: Only set environment variable if integration tests are enabled.Daan De Meyer2024-05-061-1/+7
| | | | | | | | | If we set it to '0' if integration tests are not enabled then we can't enable them from the command line since environment from meson takes priority over environment variables from the command line. We also rename the related variables to avoid conflicts with the existing integration_tests variable.
* test: Formatting fixesDaan De Meyer2024-05-061-6/+6
|
* meson: Test installation fixesDaan De Meyer2024-05-051-8/+16
| | | | | | | Let's use the new follow_symlinks flag instead on newer meson to. We also switch back to copying symlinks instead of following them and add an exclude for 25-default.link which becomes dangling when installed and recreate it manually instead.
* test: Enable TEST-06-SELINUX testing with mkosiRichard Maw2024-05-031-1/+1
|
* test: Follow symlinks when copying with rsyncDaan De Meyer2024-05-011-1/+1
| | | | | | We have e.g. 25-default.link in test-network/ which becomes a broken symlink when installed so let's not copy the symlinks but follow them instead so they don't become broken.
* test: Add disabled mkosi tests to meson.buildDaan De Meyer2024-04-301-0/+18
| | | | Makes it easier to track which ones still need to be fixed.
* test: Enable more mkosi integration testsRichard Maw2024-04-301-0/+11
|
* test: Bump mkosi integration test timeout to 1800 secondsDaan De Meyer2024-04-301-1/+1
| | | | Same timeout as the bash framework.
* test: Make journal storage configurable per test and make persistent for ↵Daan De Meyer2024-04-301-0/+2
| | | | | | TEST-09-JOURNAL Also fix a bug in the logic since it's 'volatile' and not 'runtime'.
* test/meson.build: Add some runnable integration testsRichard Maw2024-04-261-0/+29
|
* mkosi: Build minimal images and enable related integration testsDaan De Meyer2024-04-251-0/+3
| | | | | | | | | | | | | | This commit adds definitions to build the minimal_0 and minimal_1 images with mkosi and includes them into the system image. We also move the building of the various app-xxx and similar images that are extremely minimal into the tests itself by moving the related logic from install_verity_minimal() into a new function install_extension_images() in util.sh. Because the mkosi /usr is read-only, we now place the extension images in /tmp instead of /usr/share. Co-authored-by: Richard Maw <richard.maw@codethink.co.uk> Co-authored-by: sam-leonard-ct <sam.leonard@codethink.co.uk>
* test: Skip meson integration tests if SYSTEMD_INTEGRATION_TESTS != 1Daan De Meyer2024-04-251-40/+34
| | | | | | | | | We cannot mark a test suite as excluded by default in meson. Instead, let's require that SYSTEMD_INTEGRATION_TESTS=1 and skip any integration test if it's not set. This is effectively the same as excluding it by default. If the integration-test option is enabled, we'll set the environment variable by default, just like we do with SYSTEMD_SLOW_TESTS and the slow-tests meson option.
* test: Various mkosi integration test improvementsDaan De Meyer2024-04-231-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Stop using logging module since the default output formatting is pretty bad. Prefer print() for now. - Log less, logging the full mkosi command line is rather verbose, especially when it contains multi-line dropins. - Streamline the journalctl command we output for debugging failed tests. - Don't force usage of the disk image format. - Don't force running without unit tests. - Don't force disabling RuntimeBuildSources. - Update documentation to streamline the command for running a single test and remove sudo as it's not required anymore. - Improve the console output by having the test unit's output logged to both the journal and the console. - Disable journal console log forwarding as we have journal forwarding as a better alternative. - Delete existing journal file before running test. - Delete journal files of succeeded tests to reduce disk usage. - Rename system_mkosi target to just mkosi - Pass in mkosi source directory explicitly to accomodate arbitrary build directory locations. - Add test interactive debugging if stdout is connected to a tty - Stop explicitly using the 'system' image since it'll likely be dropped soon. - Only forward journal if we're not running in debugging mode. - Stop using testsuite.target and instead just add the necessary extras to the main testsuite unit via the credential dropin. - Override type to idle so test output is not interleaved with status output. - Don't build mkosi target by default - Always add the mkosi target if mkosi is found - Remove dependency of the integration tests on the mkosi target as otherwise the image is always built, even though we configure it to not be built by default. - Move mkosi output, cache and build directory into build/ so that invocations from meson and regular invocations share the same directories. - Various aesthetic cleanups.
* test: Add mkosi-based integration test runnerRichard Maw2024-04-181-0/+41
| | | | | The first two tests are included to ensure parallel test execution is demonstrable.
* test: Install test journalsDaan De Meyer2024-03-221-0/+1
| | | | Let's package these just like we package other test data.
* meson: Always build bootctlDaan De Meyer2023-10-251-1/+1
| | | | | | | | bootctl is rather useful to have, even if on a system without UEFI, as it has a number of verbs that are unrelated to UEFI (e.g kernel-identify), and more importantly, it supports --root to operate on directory trees (which could be intended to be deployed on UEFI) so let's make sure we always build it.
* meson: fix TODO regarding next meson versionLuca Boccassi2023-09-181-1/+1
|
* meson: add TODO to switch to new 'follow_symlinks' option in the futureLuca Boccassi2023-09-171-2/+3
| | | | Newly added and will be in the next release of Meson
* meson: Use rsync to copy test data directoriesDaan De Meyer2023-08-171-3/+12
| | | | | | | | | | | | | | | | install_subdir() does not copy symlinks but copies the file they point to. We also get a very ugly warning in the meson install output: """ Warning: trying to copy a symlink that points to a file. This will copy the file, but this will be changed in a future version of Meson to copy the symlink as is. Please update your build definitions so that it will not break when the change happens. """ Let's fix both problems at once by using rsync which does the right thing. Verified by running systemd-dissect --mtree on both the install output before and after and all the symlinks are now correctly preserved.
* meson: use install_emptydir() and drop meson-make-symlink.shYu Watanabe2023-08-081-3/+2
| | | | | | The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'. Let's replace it with install_emptydir() builtin function and inline meson call.
* meson: set suite for all tests, and adjust suite for some testsYu Watanabe2023-08-031-14/+26
|
* meson: also merge declarations of fuzzers with other executablesYu Watanabe2023-08-031-4/+0
|
* meson: merge declarations of normal and test executablesYu Watanabe2023-08-031-1/+9
|