summaryrefslogtreecommitdiffstats
path: root/test/README.testsuite
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:50 +0000
commit19f4f86bfed21c5326ed2acebe1163f3a83e832b (patch)
treed59b9989ce55ed23693e80974d94c856f1c2c8b1 /test/README.testsuite
parentInitial commit. (diff)
downloadsystemd-19f4f86bfed21c5326ed2acebe1163f3a83e832b.tar.xz
systemd-19f4f86bfed21c5326ed2acebe1163f3a83e832b.zip
Adding upstream version 241.upstream/241upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/README.testsuite')
-rw-r--r--test/README.testsuite67
1 files changed, 67 insertions, 0 deletions
diff --git a/test/README.testsuite b/test/README.testsuite
new file mode 100644
index 0000000..2edcf6a
--- /dev/null
+++ b/test/README.testsuite
@@ -0,0 +1,67 @@
+The extended testsuite only works with UID=0. It contains of several
+subdirectories named "test/TEST-??-*", which are run one by one.
+
+To run the extended testsuite do the following:
+
+$ ninja -C build # Avoid building anything as root later
+$ sudo test/run-integration-tests.sh
+ninja: Entering directory `/home/zbyszek/src/systemd/build'
+ninja: no work to do.
+--x-- Running TEST-01-BASIC --x--
++ make -C TEST-01-BASIC BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run
+make: Entering directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC'
+TEST CLEANUP: Basic systemd setup
+TEST SETUP: Basic systemd setup
+...
+TEST RUN: Basic systemd setup [OK]
+make: Leaving directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC'
+--x-- Result of TEST-01-BASIC: 0 --x--
+--x-- Running TEST-02-CRYPTSETUP --x--
++ make -C TEST-02-CRYPTSETUP BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run
+
+If one of the tests fails, then $subdir/test.log contains the log file of
+the test.
+
+To run just one of the cases:
+
+$ sudo make -C test/TEST-01-BASIC clean setup run
+
+Specifying the build directory
+==============================
+
+If the build directory is not detected automatically, it can be specified
+with BUILD_DIR=:
+
+$ sudo BUILD_DIR=some-other-build/ test/run-integration-tests
+
+or
+
+$ sudo make -C test/TEST-01-BASIC BUILD_DIR=../../some-other-build/ ...
+
+Note that in the second case, the path is relative to the test case directory.
+An absolute path may also be used in both cases.
+
+Configuration variables
+=======================
+
+TEST_NO_QEMU=1 can be used to disable qemu tests.
+
+TEST_NO_NSPAWN=1 can be used to disable nspawn tests.
+
+KERNEL_APPEND='...' can be used to add additional kernel parameters for the QEMU runs.
+
+The kernel and initramfs can be specified with $KERNEL_BIN and $INITRD.
+(Fedora's or Debian's default kernel path and initramfs are used by default)
+
+A script will try to find your QEMU binary. If you want to specify a different
+one with $QEMU_BIN.
+
+Debugging the qemu image
+========================
+
+If you want to log in the testsuite virtual machine, you can specify additional
+kernel command line parameter with $KERNEL_APPEND and then log in as root.
+
+$ sudo make -C test/TEST-01-BASIC KERNEL_APPEND="systemd.unit=multi-user.target" run
+
+Root password is empty.