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