]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-26-SETENV/test.sh
network: make all failures in route configuration fatal
[thirdparty/systemd.git] / test / TEST-26-SETENV / test.sh
CommitLineData
79411bbc 1#!/bin/bash
79411bbc
LP
2set -e
3TEST_DESCRIPTION="test setenv"
4
5. $TEST_BASE_DIR/test-functions
6
7test_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]
21Description=Testsuite service
22
23[Service]
24ExecStart=/bin/bash -x /testsuite.sh
25Type=oneshot
26StandardOutput=tty
27StandardError=tty
28NotifyAccess=all
29EOF
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
40do_test "$@"