2018-11-26 21:16:27 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
TEST_DESCRIPTION="test setenv"
|
|
|
|
|
|
|
|
. $TEST_BASE_DIR/test-functions
|
|
|
|
|
|
|
|
test_setup() {
|
2019-07-12 17:47:26 +02:00
|
|
|
create_empty_image_rootdir
|
2018-11-26 21:16:27 +01:00
|
|
|
|
|
|
|
(
|
|
|
|
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 <<EOF
|
|
|
|
[Unit]
|
|
|
|
Description=Testsuite service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStart=/bin/bash -x /testsuite.sh
|
|
|
|
Type=oneshot
|
|
|
|
StandardOutput=tty
|
|
|
|
StandardError=tty
|
|
|
|
NotifyAccess=all
|
|
|
|
EOF
|
|
|
|
cp testsuite.sh $initdir/
|
|
|
|
|
|
|
|
setup_testsuite
|
2019-07-08 21:11:32 +02:00
|
|
|
)
|
2018-11-26 21:16:27 +01:00
|
|
|
setup_nspawn_root
|
|
|
|
}
|
|
|
|
|
|
|
|
do_test "$@"
|