]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/README.testsuite
man: fix reference to sd_bus_add_fallback_vtable
[thirdparty/systemd.git] / test / README.testsuite
index 5c7aca43a8e6a5e4557e783e4a4cade1fbe1ad3a..7ff148e1300d58147f9f28fc449fa74ae0ff3944 100644 (file)
@@ -1,46 +1,94 @@
-The extended testsuite only works with uid=0. It contains of several
+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:
 
-$ make all
-$ cd test
-$ sudo make clean check
-...
-make[1]: Entering directory `/mnt/data/harald/git/systemd/test/TEST-01-BASIC'
-Making all in .
-Making all in po
-TEST: Basic systemd setup [OK]
-make[1]: Leaving directory `/mnt/data/harald/git/systemd/test/TEST-01-BASIC'
+$ 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 debug a special testcase of the testsuite do:
+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.
 
-$ make all
-$ cd test/TEST-01-BASIC
-$ sudo make clean setup run
+Configuration variables
+=======================
 
-QEMU
-====
+TEST_NO_QEMU=1
+    Don't run tests under QEMU
 
-If you want to log in the testsuite virtual machine, you can specify
-additional kernel command line parameter with $KERNEL_APPEND.
+TEST_NO_NSPAWN=1
+    Don't run tests under systemd-nspawn
 
-$ sudo make KERNEL_APPEND="systemd.unit=multi-user.target" clean setup run
+TEST_NO_KVM=1
+    Disable QEMU KVM autodetection (may be necessary when you're trying to run the
+    *vanilla* QEMU and have both qemu and qemu-kvm installed)
 
-you can even skip the "clean" and "setup" if you want to run the machine again.
+QEMU_MEM=512M
+    Configure amount of memory for QEMU VMs (defaults to 512M)
 
-$ sudo make KERNEL_APPEND="systemd.unit=multi-user.target" run
+QEMU_SMP=1
+    Configure number of CPUs for QEMU VMs (defaults to 1)
 
-You can specify a different kernel and initramfs with $KERNEL_BIN and $INITRD.
-(Fedora's default kernel path and initramfs are used by default)
+KERNEL_APPEND='...'
+    Append additional parameters to the kernel command line
 
-$ sudo make KERNEL_BIN=/boot/vmlinuz-foo INITRD=/boot/initramfs-bar clean check
+NSPAWN_ARGUMENTS='...'
+    Specify additional arguments for systemd-nspawn
+
+QEMU_TIMEOUT=infinity
+    Set a timeout for tests under QEMU (defaults to infinity)
+
+NSPAWN_TIMEOUT=infinity
+    Set a timeout for tests under systemd-nspawn (defaults to infinity)
+
+INTERACTIVE_DEBUG=1
+    Configure the machine to be more *user-friendly* for interactive debuggung
+    (e.g. by setting a usable default terminal, suppressing the shutdown after
+    the test, etc.)
+
+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 you can use $QEMU_BIN.
+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
 
-$ sudo make QEMU_BIN=/path/to/qemu/qemu-kvm clean check
+Root password is empty.