From 8fe6ad4c7d368717a4bfa6e2c6459980d65cf95a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Aug 2018 11:38:57 +0100 Subject: [PATCH] test suite: run-all: Honour DGIT_TESTS_TMPDIR If this variable is set, tests/tmp will be made a symlink to a real subdirectory under $DGIT_TESTS_TMPDIR. The real subdirectory will be removed and recreated as tests/tmp would otherwise be. I set it to /run/user/`id -u`/dgit-tests-tmp Signed-off-by: Ian Jackson --- tests/run-all | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/run-all b/tests/run-all index e1718fa9..a37b6aad 100755 --- a/tests/run-all +++ b/tests/run-all @@ -21,7 +21,17 @@ if [ $# != 0 ]; then set TESTSCRIPTS="$*" fi -tmpdir=tests/tmp +if [ "x$DGIT_TESTS_TMPDIR" != x ]; then + tmpdir="$PWD" + tmpdir="${tmpdir#/}" + tmpdir="${tmpdir//!/!#!}" + tmpdir="${tmpdir//\//!}" + tmpdir="$DGIT_TESTS_TMPDIR/$tmpdir" + rm -f tests/tmp + ln -ns -- "$tmpdir" tests/tmp +else + tmpdir=tests/tmp +fi case "$DGIT_TESTS_PROGRESSIVE" in ''|n) -- 2.30.2