1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

ctdb-tests: Put the summary file inside $TEST_VAR_DIR

This means less random files dropped in /tmp or similar.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2019-09-04 15:04:05 +10:00 committed by Amitay Isaacs
parent 7a5a4a4494
commit 2b37d99a5f

View File

@ -175,8 +175,6 @@ if ! type mktemp >/dev/null 2>&1 ; then
}
fi
sf=$(mktemp) || die "mktemp failed for sf - is TMPDIR missing?"
set -o pipefail
run_one_test ()
@ -199,7 +197,7 @@ run_one_test ()
else
t="*FAILED*"
fi
echo "$t $f" >>"$sf"
echo "$t $f" >>"$summary_file"
fi
}
@ -278,6 +276,9 @@ if [ -z "$TEST_VAR_DIR" ] ; then
fi
mkdir -p "$TEST_VAR_DIR"
summary_file="${TEST_VAR_DIR}/.summary"
: >"$summary_file"
export TEST_SCRIPTS_DIR="${CTDB_TEST_DIR}/scripts"
unit_tests="
@ -349,13 +350,12 @@ done
if $with_summary ; then
if [ $status -eq 0 ] || ! $exit_on_fail ; then
echo
cat "$sf"
cat "$summary_file"
echo
echo "${tests_passed}/${tests_total} tests passed"
fi
fi
rm -f "$sf"
rm -f "$summary_file"
echo