]>
Commit | Line | Data |
---|---|---|
b5da077d | 1 | #!/bin/bash |
818567fc | 2 | set -e |
d710d363 | 3 | TEST_DESCRIPTION="Job-related tests" |
3edc0c59 | 4 | TEST_NO_QEMU=1 |
b5da077d | 5 | |
fff87a35 | 6 | . $TEST_BASE_DIR/test-functions |
b5da077d | 7 | |
b5da077d | 8 | test_setup() { |
ec4cab49 | 9 | create_empty_image_rootdir |
b5da077d MS |
10 | |
11 | # Create what will eventually be our root filesystem onto an overlay | |
12 | ( | |
13 | LOG_LEVEL=5 | |
b5da077d MS |
14 | eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) |
15 | ||
889a9042 | 16 | setup_basic_environment |
51fa8591 | 17 | mask_supporting_services |
056ae881 | 18 | |
b5da077d MS |
19 | # setup the testsuite service |
20 | cat >$initdir/etc/systemd/system/testsuite.service <<EOF | |
21 | [Unit] | |
22 | Description=Testsuite service | |
23 | After=multi-user.target | |
24 | ||
25 | [Service] | |
26 | ExecStart=/test-jobs.sh | |
27 | Type=oneshot | |
28 | EOF | |
29 | ||
30 | # copy the units used by this test | |
d710d363 MS |
31 | cp $TEST_BASE_DIR/{hello.service,sleep.service,hello-after-sleep.target,unstoppable.service} \ |
32 | $initdir/etc/systemd/system | |
b5da077d MS |
33 | cp test-jobs.sh $initdir/ |
34 | ||
889a9042 | 35 | setup_testsuite |
cc469c3d | 36 | ) |
889a9042 | 37 | setup_nspawn_root |
b5da077d MS |
38 | } |
39 | ||
b5da077d | 40 | do_test "$@" |