diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-11-28 18:01:27 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-11-28 20:39:07 -0600 |
commit | afe10960c138295dfeb79f55d79abc5167a126a7 (patch) | |
tree | d34493ba40215473231fa9ba2976d6f31f41a7dc /external/test | |
parent | 17cd974074e656d0b7bbe8e284b1cda095e7a6fd (diff) | |
download | skiboot-afe10960c138295dfeb79f55d79abc5167a126a7.zip skiboot-afe10960c138295dfeb79f55d79abc5167a126a7.tar.gz skiboot-afe10960c138295dfeb79f55d79abc5167a126a7.tar.bz2 |
external/test: Display test dir on failure
Print some information about the failing test rather than forcing the
user to go dig it up. Also move the stdout and stderr files into the
test directory to make the relevant stdout/stderr files easier to
locate.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/test')
-rwxr-xr-x | external/test/test.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/external/test/test.sh b/external/test/test.sh index c3bbc61..7a60c93 100755 --- a/external/test/test.sh +++ b/external/test/test.sh @@ -27,6 +27,10 @@ run_binary() { fail_test() { echo "$0 ($CUR_TEST): test failed"; + echo "Test directory preserved:" + echo " DATA_DIR = $DATA_DIR" + echo " STDOUT = $STDOUT_OUT" + echo " STDERR = $STDERR_OUT" exit ${1:-1}; } @@ -76,9 +80,9 @@ run_tests() { exit 1; fi - export STDERR_OUT=$(mktemp --tmpdir external-test-stderr.XXXXXX); - export STDOUT_OUT=$(mktemp --tmpdir external-test-stdout.XXXXXX); export DATA_DIR=$(mktemp --tmpdir -d external-test-datadir.XXXXXX); + export STDERR_OUT="$DATA_DIR/stderr" + export STDOUT_OUT="$DATA_DIR/stdout" if [ $# -eq 3 ] ; then cp -r $3/* "$DATA_DIR" fi |