]>
Commit | Line | Data |
---|---|---|
8246bb20 YW |
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="test RuntimeDirectoryPreserve=yes" | |
6 | ||
7 | . $TEST_BASE_DIR/test-functions | |
8 | ||
9 | test_setup() { | |
10 | create_empty_image_rootdir | |
11 | ||
12 | ( | |
13 | LOG_LEVEL=5 | |
14 | eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) | |
15 | ||
16 | setup_basic_environment | |
17 | ||
18 | # mask some services that we do not want to run in these tests | |
19 | ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service | |
20 | ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service | |
21 | ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service | |
22 | ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket | |
23 | ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service | |
24 | ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service | |
25 | ||
26 | # setup the testsuite service | |
27 | cat >$initdir/etc/systemd/system/testsuite.service <<EOF | |
28 | [Unit] | |
29 | Description=Testsuite service | |
30 | ||
31 | [Service] | |
32 | ExecStart=/bin/bash -x /testsuite.sh | |
33 | Type=oneshot | |
8246bb20 YW |
34 | EOF |
35 | cp testsuite.sh $initdir/ | |
36 | ||
37 | setup_testsuite | |
38 | ) || return 1 | |
39 | setup_nspawn_root | |
40 | } | |
41 | ||
42 | do_test "$@" |