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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-10-01 14:55:22 +02:00
parent aa25270cb2
commit a3709e3709
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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"

View File

@ -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)