From 79411bbcce7057754942af30939428d38f4369ac Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 26 Nov 2018 21:16:27 +0100 Subject: [PATCH] test: add test for setting service manager environment variables This is a follow-up for #10594. I somehow forgot to commit this when I worked on that. --- test/TEST-26-SETENV/Makefile | 1 + test/TEST-26-SETENV/test.sh | 42 ++++++++++++++++++++++++++++++++ test/TEST-26-SETENV/testsuite.sh | 33 +++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 120000 test/TEST-26-SETENV/Makefile create mode 100755 test/TEST-26-SETENV/test.sh create mode 100755 test/TEST-26-SETENV/testsuite.sh diff --git a/test/TEST-26-SETENV/Makefile b/test/TEST-26-SETENV/Makefile new file mode 120000 index 00000000000..e9f93b1104c --- /dev/null +++ b/test/TEST-26-SETENV/Makefile @@ -0,0 +1 @@ +../TEST-01-BASIC/Makefile \ No newline at end of file diff --git a/test/TEST-26-SETENV/test.sh b/test/TEST-26-SETENV/test.sh new file mode 100755 index 00000000000..fb9c18926fa --- /dev/null +++ b/test/TEST-26-SETENV/test.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh +set -e +TEST_DESCRIPTION="test setenv" + +. $TEST_BASE_DIR/test-functions + +test_setup() { + create_empty_image + mkdir -p $TESTDIR/root + mount ${LOOPDEV}p1 $TESTDIR/root + + ( + LOG_LEVEL=5 + eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) + + setup_basic_environment + + # setup the testsuite service + cat >$initdir/etc/systemd/system/testsuite.service <