]>
Commit | Line | Data |
---|---|---|
a327431b | 1 | #!/bin/bash |
a327431b DB |
2 | set -e |
3 | TEST_DESCRIPTION="EXTEND_TIMEOUT_USEC=usec start/runtime/stop tests" | |
4 | SKIP_INITRD=yes | |
3edc0c59 | 5 | TEST_NO_QEMU=1 |
a327431b DB |
6 | |
7 | . $TEST_BASE_DIR/test-functions | |
8 | ||
9 | test_setup() { | |
10 | create_empty_image | |
11 | mkdir -p $TESTDIR/root | |
12 | mount ${LOOPDEV}p1 $TESTDIR/root | |
13 | ||
14 | # Create what will eventually be our root filesystem onto an overlay | |
15 | ( | |
16 | eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) | |
17 | ||
18 | setup_basic_environment | |
19 | ||
20 | for s in success-all success-start success-stop success-runtime \ | |
21 | fail-start fail-stop fail-runtime | |
22 | do | |
23 | cp testsuite-${s}.service ${initdir}/etc/systemd/system | |
24 | done | |
25 | cp testsuite.service ${initdir}/etc/systemd/system | |
26 | ||
27 | cp extend_timeout_test_service.sh ${initdir}/ | |
28 | cp assess.sh ${initdir}/ | |
29 | cp $BUILD_DIR/systemd-notify ${initdir}/bin | |
30 | cp $BUILD_DIR/src/shared/libsystemd-shared-*.so ${initdir}/usr/lib | |
31 | ||
32 | setup_testsuite | |
33 | ) || return 1 | |
34 | # mask some services that we do not want to run in these tests | |
35 | ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service | |
36 | ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service | |
37 | ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service | |
38 | ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket | |
39 | ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service | |
40 | ||
41 | setup_nspawn_root | |
42 | ||
43 | ddebug "umount $TESTDIR/root" | |
44 | umount $TESTDIR/root | |
45 | } | |
46 | ||
47 | test_cleanup() { | |
48 | return 0 | |
49 | } | |
50 | ||
51 | do_test "$@" |