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