]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-26-SETENV/test.sh
scripts: use 4 space indentation
[thirdparty/systemd.git] / test / TEST-26-SETENV / test.sh
1 #!/bin/bash
2 set -e
3 TEST_DESCRIPTION="test setenv"
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
18 # setup the testsuite service
19 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
20 [Unit]
21 Description=Testsuite service
22
23 [Service]
24 ExecStart=/bin/bash -x /testsuite.sh
25 Type=oneshot
26 StandardOutput=tty
27 StandardError=tty
28 NotifyAccess=all
29 EOF
30 cp testsuite.sh $initdir/
31
32 setup_testsuite
33 ) || return 1
34 setup_nspawn_root
35
36 ddebug "umount $TESTDIR/root"
37 umount $TESTDIR/root
38 }
39
40 do_test "$@"