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:
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user