chiark / gitweb /
test suite: run-all: Without --progressive, rm and recreate tests/tmp
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Aug 2018 10:25:26 +0000 (11:25 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Aug 2018 10:54:41 +0000 (11:54 +0100)
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>
tests/run-all

index c930171..e1718fa 100755 (executable)
@@ -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 ||: )