]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-31-DEVICE-ENUMERATION/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-31-DEVICE-ENUMERATION / test.sh
CommitLineData
8cc6727a 1#!/bin/bash
8cc6727a
YW
2set -e
3TEST_DESCRIPTION="plugged -> dead -> plugged issue #11997"
4TEST_NO_NSPAWN=1
5
6. $TEST_BASE_DIR/test-functions
7QEMU_TIMEOUT=300
8
9test_setup() {
ec4cab49 10 create_empty_image_rootdir
8cc6727a
YW
11
12 (
13 LOG_LEVEL=5
14 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
15
16 setup_basic_environment
51fa8591 17 mask_supporting_services
8cc6727a
YW
18
19 # setup the testsuite service
20 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
21[Unit]
22Description=Testsuite service
23
24[Service]
25ExecStart=/bin/bash -x /testsuite.sh
26Type=oneshot
8cc6727a
YW
27EOF
28 cp testsuite.sh $initdir/
29
30 setup_testsuite
cc469c3d 31 )
8cc6727a
YW
32}
33
34do_test "$@"