]>
Commit | Line | Data |
---|---|---|
f5095a6a | 1 | #!/bin/bash |
f5095a6a LP |
2 | set -e |
3 | TEST_DESCRIPTION="test importd" | |
4 | ||
5 | . $TEST_BASE_DIR/test-functions | |
6 | ||
7 | test_setup() { | |
8 | create_empty_image | |
9 | mkdir -p $TESTDIR/root | |
10 | mount ${LOOPDEV}p1 $TESTDIR/root | |
11 | ||
12 | ( | |
13 | LOG_LEVEL=5 | |
14 | eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) | |
15 | ||
16 | setup_basic_environment | |
17 | dracut_install dd gunzip mv tar diff | |
18 | ||
19 | # setup the testsuite service | |
20 | cat >$initdir/etc/systemd/system/testsuite.service <<EOF | |
21 | [Unit] | |
22 | Description=Testsuite service | |
23 | ||
24 | [Service] | |
25 | ExecStart=/testsuite.sh | |
26 | Type=oneshot | |
27 | StandardOutput=tty | |
28 | StandardError=tty | |
29 | NotifyAccess=all | |
30 | EOF | |
31 | cp testsuite.sh $initdir/ | |
32 | ||
33 | setup_testsuite | |
34 | ) || return 1 | |
35 | setup_nspawn_root | |
36 | ||
37 | ddebug "umount $TESTDIR/root" | |
38 | umount $TESTDIR/root | |
39 | } | |
40 | ||
41 | do_test "$@" |