diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-10-01 14:55:22 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-10-01 19:53:45 +0200 |
commit | a3709e3709ae1afae39e69058a7cc2ac81f1ae78 (patch) | |
tree | 47ad3563cee2b0249ebd1156ec2a9ece6b5050c3 | |
parent | sysusers: look at login.defs when setting the default range to allocate users (diff) | |
download | systemd-a3709e3709ae1afae39e69058a7cc2ac81f1ae78.tar.xz systemd-a3709e3709ae1afae39e69058a7cc2ac81f1ae78.zip |
tests: when creating temp dirs, include test name in path
This makes it easier to figure out which directory we want to look at
when tests fail, and also which test left behind a directory when it
shouldn't.
-rwxr-xr-x | src/partition/test-repart.sh | 2 | ||||
-rwxr-xr-x | test/hwdb-test.sh | 2 | ||||
-rwxr-xr-x | test/test-network-generator-conversion.sh | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/partition/test-repart.sh b/src/partition/test-repart.sh index 5765978290..9af3049b6b 100755 --- a/src/partition/test-repart.sh +++ b/src/partition/test-repart.sh @@ -6,7 +6,7 @@ set -ex repart=$1 test -x $repart -D=$(mktemp --directory) +D=$(mktemp --tmpdir --directory "test-repart.XXXXXXXXXX") trap "rm -rf '$D'" EXIT INT QUIT PIPE mkdir -p $D/definitions diff --git a/test/hwdb-test.sh b/test/hwdb-test.sh index d12f82fa2d..8b909f7d80 100755 --- a/test/hwdb-test.sh +++ b/test/hwdb-test.sh @@ -18,7 +18,7 @@ if [ ! -x "$SYSTEMD_HWDB" ]; then exit 1 fi -D=$(mktemp --directory) +D=$(mktemp --tmpdir --directory "hwdb-test.XXXXXXXXXX") trap "rm -rf '$D'" EXIT INT QUIT PIPE mkdir -p "$D/etc/udev" ln -s "$ROOTDIR/hwdb.d" "$D/etc/udev/hwdb.d" diff --git a/test/test-network-generator-conversion.sh b/test/test-network-generator-conversion.sh index d0d0834518..50df69f1b0 100755 --- a/test/test-network-generator-conversion.sh +++ b/test/test-network-generator-conversion.sh @@ -17,7 +17,7 @@ for f in "$src"/test-*.input; do echo "*** Running $f" ( - out=$(mktemp --directory) + out=$(mktemp --tmpdir --directory "test-network-generator-conversion.XXXXXXXXXX") trap "rm -rf '$out'" EXIT INT QUIT PIPE $generator --root "$out" -- $(cat $f) |