]>
Commit | Line | Data |
---|---|---|
64d14b7e | 1 | The extended testsuite only works with UID=0. It contains of several |
c452e372 HH |
2 | subdirectories named "test/TEST-??-*", which are run one by one. |
3 | ||
4 | To run the extended testsuite do the following: | |
5 | ||
64d14b7e ZJS |
6 | $ ninja -C build # Avoid building anything as root later |
7 | $ sudo test/run-integration-tests.sh | |
8 | ninja: Entering directory `/home/zbyszek/src/systemd/build' | |
9 | ninja: no work to do. | |
10 | --x-- Running TEST-01-BASIC --x-- | |
11 | + make -C TEST-01-BASIC BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run | |
12 | make: Entering directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC' | |
13 | TEST CLEANUP: Basic systemd setup | |
14 | TEST SETUP: Basic systemd setup | |
c452e372 | 15 | ... |
64d14b7e ZJS |
16 | TEST RUN: Basic systemd setup [OK] |
17 | make: Leaving directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC' | |
18 | --x-- Result of TEST-01-BASIC: 0 --x-- | |
19 | --x-- Running TEST-02-CRYPTSETUP --x-- | |
20 | + make -C TEST-02-CRYPTSETUP BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run | |
c452e372 HH |
21 | |
22 | If one of the tests fails, then $subdir/test.log contains the log file of | |
23 | the test. | |
24 | ||
64d14b7e | 25 | To run just one of the cases: |
c452e372 | 26 | |
64d14b7e | 27 | $ sudo make -C test/TEST-01-BASIC clean setup run |
c452e372 | 28 | |
64d14b7e ZJS |
29 | Specifying the build directory |
30 | ============================== | |
c6a77179 | 31 | |
64d14b7e ZJS |
32 | If the build directory is not detected automatically, it can be specified |
33 | with BUILD_DIR=: | |
c452e372 | 34 | |
64d14b7e | 35 | $ sudo BUILD_DIR=some-other-build/ test/run-integration-tests |
c452e372 | 36 | |
64d14b7e | 37 | or |
c452e372 | 38 | |
64d14b7e | 39 | $ sudo make -C test/TEST-01-BASIC BUILD_DIR=../../some-other-build/ ... |
c6a77179 | 40 | |
64d14b7e ZJS |
41 | Note that in the second case, the path is relative to the test case directory. |
42 | An absolute path may also be used in both cases. | |
43 | ||
44 | Configuration variables | |
45 | ======================= | |
46 | ||
5a2114b6 FS |
47 | TEST_NO_QEMU=1 |
48 | Don't run tests under QEMU | |
64d14b7e | 49 | |
5a2114b6 FS |
50 | TEST_NO_NSPAWN=1 |
51 | Don't run tests under systemd-nspawn | |
c6a77179 | 52 | |
5a2114b6 FS |
53 | TEST_NO_KVM=1 |
54 | Disable QEMU KVM autodetection (may be necessary when you're trying to run the | |
55 | *vanilla* QEMU and have both qemu and qemu-kvm installed) | |
56 | ||
57 | QEMU_MEM=512M | |
58 | Configure amount of memory for QEMU VMs (defaults to 512M) | |
59 | ||
60 | QEMU_SMP=1 | |
61 | Configure number of CPUs for QEMU VMs (defaults to 1) | |
62 | ||
63 | KERNEL_APPEND='...' | |
64 | Append additional parameters to the kernel command line | |
65 | ||
66 | NSPAWN_ARGUMENTS='...' | |
67 | Specify additional arguments for systemd-nspawn | |
68 | ||
69 | QEMU_TIMEOUT=infinity | |
70 | Set a timeout for tests under QEMU (defaults to infinity) | |
71 | ||
72 | NSPAWN_TIMEOUT=infinity | |
73 | Set a timeout for tests under systemd-nspawn (defaults to infinity) | |
74 | ||
75 | INTERACTIVE_DEBUG=1 | |
76 | Configure the machine to be more *user-friendly* for interactive debuggung | |
77 | (e.g. by setting a usable default terminal, suppressing the shutdown after | |
78 | the test, etc.) | |
64d14b7e ZJS |
79 | |
80 | The kernel and initramfs can be specified with $KERNEL_BIN and $INITRD. | |
81 | (Fedora's or Debian's default kernel path and initramfs are used by default) | |
c6a77179 RC |
82 | |
83 | A script will try to find your QEMU binary. If you want to specify a different | |
64d14b7e ZJS |
84 | one with $QEMU_BIN. |
85 | ||
86 | Debugging the qemu image | |
87 | ======================== | |
88 | ||
89 | If you want to log in the testsuite virtual machine, you can specify additional | |
90 | kernel command line parameter with $KERNEL_APPEND and then log in as root. | |
91 | ||
92 | $ sudo make -C test/TEST-01-BASIC KERNEL_APPEND="systemd.unit=multi-user.target" run | |
c6a77179 | 93 | |
64d14b7e | 94 | Root password is empty. |