summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-26 11:25:26 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-26 11:54:41 +0100
commit8744462e90f4af03214a1398d829c69ad034b4c6 (patch)
tree307bf110e9e1832177dcb1fd38cdfa589d5b38c1
parent4fb9b340d818b131457079f24c500a5f325977af (diff)
test suite: run-all: Without --progressive, rm and recreate tests/tmp
This arranges to rerun tests/setup/ scripts, which wouldn't otherwise happen; that is IMO a bug. While we are here, introduce $tmpdir. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xtests/run-all11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/run-all b/tests/run-all
index c930171..e1718fa 100755
--- a/tests/run-all
+++ b/tests/run-all
@@ -21,9 +21,16 @@ if [ $# != 0 ]; then
set TESTSCRIPTS="$*"
fi
-mkdir -p tests/tmp
+tmpdir=tests/tmp
+
+case "$DGIT_TESTS_PROGRESSIVE" in
+''|n)
+ rm -rf -- "$tmpdir"
+ ;;
+esac
+
+mkdir -p -- "$tmpdir"
-${DGIT_TESTS_PROGRESSIVE+:} rm -f tests/tmp/*.ok
export DGIT_GNUPG_STUNT_ERRLOG=$( tty -s ||: )