]>
Commit | Line | Data |
---|---|---|
3ac62a0e | 1 | #!/bin/bash |
3ac62a0e LP |
2 | set -e |
3 | TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property" | |
4 | TEST_NO_NSPAWN=1 | |
5 | ||
6 | . $TEST_BASE_DIR/test-functions | |
f775f613 | 7 | QEMU_TIMEOUT=300 |
3ac62a0e LP |
8 | |
9 | test_setup() { | |
10 | create_empty_image | |
11 | mkdir -p $TESTDIR/root | |
12 | mount ${LOOPDEV}p1 $TESTDIR/root | |
13 | ||
14 | ( | |
15 | LOG_LEVEL=5 | |
16 | eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) | |
17 | ||
18 | setup_basic_environment | |
19 | ||
20 | # mask some services that we do not want to run in these tests | |
21 | ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service | |
22 | ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service | |
23 | ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service | |
24 | ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket | |
25 | ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service | |
26 | ||
27 | # setup the testsuite service | |
28 | cat >$initdir/etc/systemd/system/testsuite.service <<EOF | |
29 | [Unit] | |
30 | Description=Testsuite service | |
31 | ||
32 | [Service] | |
23209bcd | 33 | ExecStart=/bin/bash -x /testsuite.sh |
3ac62a0e LP |
34 | Type=oneshot |
35 | StandardOutput=tty | |
36 | StandardError=tty | |
37 | EOF | |
38 | cp testsuite.sh $initdir/ | |
39 | ||
40 | setup_testsuite | |
41 | ) || return 1 | |
42 | ||
43 | ddebug "umount $TESTDIR/root" | |
44 | umount $TESTDIR/root | |
45 | } | |
46 | ||
47 | do_test "$@" |