1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

test: don't overwrite TESTDIR if already set

This commit is contained in:
Frantisek Sumsal 2019-03-12 22:44:25 +01:00 committed by Lennart Poettering
parent 96c45cc697
commit 3f50fff536

View File

@ -817,8 +817,13 @@ inst_libs() {
import_testdir() {
[[ -e $STATEFILE ]] && . $STATEFILE
if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then
TESTDIR=$(mktemp --tmpdir=/var/tmp -d -t systemd-test.XXXXXX)
if [[ ! -d "$TESTDIR" ]]; then
if [[ -z "$TESTDIR" ]]; then
TESTDIR=$(mktemp --tmpdir=/var/tmp -d -t systemd-test.XXXXXX)
else
mkdir -p "$TESTDIR"
fi
echo "TESTDIR=\"$TESTDIR\"" > $STATEFILE
export TESTDIR
fi