]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-29-UDEV-ID_RENAMING/test.sh
test: add function to reduce copied setup boilerplate
[thirdparty/systemd.git] / test / TEST-29-UDEV-ID_RENAMING / test.sh
CommitLineData
1ec38b85 1#!/bin/bash
1ec38b85
YW
2set -e
3TEST_DESCRIPTION="UDEV ID_RENAMING property"
4TEST_NO_NSPAWN=1
5
6. $TEST_BASE_DIR/test-functions
7QEMU_TIMEOUT=300
8
9test_setup() {
ec4cab49 10 create_empty_image_rootdir
1ec38b85
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
1ec38b85
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
1ec38b85
YW
27EOF
28 cp testsuite.sh $initdir/
29
30 setup_testsuite
cc469c3d 31 )
1ec38b85
YW
32}
33
34do_test "$@"