]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-26-SETENV/test.sh
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / test / TEST-26-SETENV / 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 setenv"
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
20 # setup the testsuite service
21 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
22 [Unit]
23 Description=Testsuite service
24
25 [Service]
26 ExecStart=/bin/bash -x /testsuite.sh
27 Type=oneshot
28 StandardOutput=tty
29 StandardError=tty
30 NotifyAccess=all
31 EOF
32 cp testsuite.sh $initdir/
33
34 setup_testsuite
35 ) || return 1
36 setup_nspawn_root
37
38 ddebug "umount $TESTDIR/root"
39 umount $TESTDIR/root
40 }
41
42 do_test "$@"