]> git.proxmox.com Git - systemd.git/blob - test/TEST-25-IMPORT/test.sh
New upstream version 240
[systemd.git] / test / TEST-25-IMPORT / test.sh
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 importd"
6
7 . $TEST_BASE_DIR/test-functions
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 dracut_install dd gunzip mv tar diff
20
21 # setup the testsuite service
22 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
23 [Unit]
24 Description=Testsuite service
25
26 [Service]
27 ExecStart=/testsuite.sh
28 Type=oneshot
29 StandardOutput=tty
30 StandardError=tty
31 NotifyAccess=all
32 EOF
33 cp testsuite.sh $initdir/
34
35 setup_testsuite
36 ) || return 1
37 setup_nspawn_root
38
39 ddebug "umount $TESTDIR/root"
40 umount $TESTDIR/root
41 }
42
43 do_test "$@"