From 284a56ff60bc8ff90c7f0e0614b1c30edd875288 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 4 Feb 2025 20:21:36 +0100 Subject: [PATCH 1/3] test: Drop -Dremote=enabled instructions from readme The test commands now use mkosi sandbox which always makes sure the required dependencies for systemd-journal-remote are enabled so no need to reconfigure meson explicitly anymore. --- test/README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/README.md b/test/README.md index d5f9ef43d4..45cc878924 100644 --- a/test/README.md +++ b/test/README.md @@ -8,12 +8,6 @@ latest version of mkosi. See for more specific details. Make sure `mkosi` is available in `$PATH` when reconfiguring meson to make sure it is picked up properly. -We also need to make sure the required meson options are enabled: - -```shell -$ mkosi -f sandbox meson setup --reconfigure build -Dremote=enabled -``` - To make sure `mkosi` doesn't try to build systemd from source during the image build process, you can add the following to `mkosi.local.conf`: From 728a88e54998d143287ffe89faaeb9512cdf24e1 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 4 Feb 2025 20:24:17 +0100 Subject: [PATCH 2/3] test: Move NO_BUILD instructions to a separate section This isn't relevant for regular development, so let's move it to a separate section. --- test/README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/test/README.md b/test/README.md index 45cc878924..5a9d29e2fc 100644 --- a/test/README.md +++ b/test/README.md @@ -8,20 +8,6 @@ latest version of mkosi. See for more specific details. Make sure `mkosi` is available in `$PATH` when reconfiguring meson to make sure it is picked up properly. -To make sure `mkosi` doesn't try to build systemd from source during the image build -process, you can add the following to `mkosi.local.conf`: - -``` -[Build] -Environment=NO_BUILD=1 -``` - -You might also want to use the `PackageDirectories=` or `Repositories=` option to provide -mkosi with a directory or repository containing the systemd packages that should be installed -instead. If the repository containing the systemd packages is not a builtin repository known -by mkosi, you can use the `SandboxTrees=` option to write an extra repository definition -to /etc which is used when building the image instead. - Next, we can build the integration test image with meson: ```shell @@ -80,6 +66,22 @@ mkosi in the systemd reposistory, so any local modifications to the mkosi configuration (e.g. in `mkosi.local.conf`) are automatically picked up and used by the integration tests as well. +## Running the integration tests without building systemd from source + +To make sure `mkosi` doesn't try to build systemd from source during the image build +process, you can add the following to `mkosi.local.conf`: + +``` +[Build] +Environment=NO_BUILD=1 +``` + +You might also want to use the `PackageDirectories=` or `Repositories=` option to provide +mkosi with a directory or repository containing the systemd packages that should be installed +instead. If the repository containing the systemd packages is not a builtin repository known +by mkosi, you can use the `SandboxTrees=` option to write an extra repository definition +to /etc which is used when building the image instead. + ## Iterating on an integration test To iterate on an integration test, let's first get a shell in the integration test environment by running From f017a5521305987fdeadf85b975b8ed44a9950b6 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 4 Feb 2025 20:46:11 +0100 Subject: [PATCH 3/3] test: Move external packages section down and reword a little This is advanced level stuff that regular contributors don't care about in the slightest, so move it further down. Also reword the section a little while we're at it. --- test/README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/README.md b/test/README.md index 5a9d29e2fc..136ab54f92 100644 --- a/test/README.md +++ b/test/README.md @@ -66,22 +66,6 @@ mkosi in the systemd reposistory, so any local modifications to the mkosi configuration (e.g. in `mkosi.local.conf`) are automatically picked up and used by the integration tests as well. -## Running the integration tests without building systemd from source - -To make sure `mkosi` doesn't try to build systemd from source during the image build -process, you can add the following to `mkosi.local.conf`: - -``` -[Build] -Environment=NO_BUILD=1 -``` - -You might also want to use the `PackageDirectories=` or `Repositories=` option to provide -mkosi with a directory or repository containing the systemd packages that should be installed -instead. If the repository containing the systemd packages is not a builtin repository known -by mkosi, you can use the `SandboxTrees=` option to write an extra repository definition -to /etc which is used when building the image instead. - ## Iterating on an integration test To iterate on an integration test, let's first get a shell in the integration test environment by running @@ -151,6 +135,22 @@ that make use of `run_testcases`. progress and only move the journal to its final location in the build directory (`$BUILD_DIR/test/journal`) when the test is finished. +## Running the integration tests without building systemd from source + +If you want to run the integration tests against prebuilt systemd packages, +first add the following to `mkosi.local.conf` to stop mkosi from building +systemd packages from source: + +```conf +[Build] +Environment=NO_BUILD=1 +``` + +You'll then probably want to use the `PackageDirectories=` or `SandboxTrees=` +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. + ### SELinux AVCs To have `TEST-06-SELINUX` check for SELinux denials, write the following to