Improve test framework: receive TFW_LOGDIR env var

Always place test logs in servald build root, regardless of current
working directory
This commit is contained in:
Andrew Bettison 2012-07-04 14:54:37 +09:30
parent 0cece65417
commit 7eb4293491
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ testdefs_sh=$(abspath "${BASH_SOURCE[0]}")
servald_source_root="${testdefs_sh%/*}"
servald_build_root="$servald_source_root"
servald_build_executable="$servald_build_root/dna"
export TFW_LOGDIR="${TFW_LOGDIR:-$servald_build_root/testlog}"
declare -a instance_stack=()

View File

@ -117,7 +117,7 @@ runTests() {
trap '_tfw_status=$?; rm -rf "$_tfw_tmpdir"; exit $_tfw_status' EXIT SIGHUP SIGINT SIGTERM
rm -rf "$_tfw_tmpdir"
mkdir -p "$_tfw_tmpdir" || return $?
_tfw_logdir="$_tfw_cwd/testlog/$_tfw_suite_name"
_tfw_logdir="${TFW_LOGDIR:-$_tfw_cwd/testlog}/$_tfw_suite_name"
_tfw_trace=false
_tfw_verbose=false
_tfw_stop_on_error=false