From 43659f44feaf1fb353b668745c19b96a5084aed5 Mon Sep 17 00:00:00 2001 From: Arnaud Blanchard <arnaudblanchard@vps663116.ovh.net> Date: Sun, 17 Mar 2019 23:00:24 +0100 Subject: [PATCH] Fix checking problem with log display in case of failure --- check.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/check.sh b/check.sh index f82a469..e82c0a0 100755 --- a/check.sh +++ b/check.sh @@ -26,8 +26,11 @@ echo "Checking blc_program" echo "====================" echo -$blaar_dir/compile.sh t_parse_args -$blaar_dir/bin/t_parse_args "arg1" "arg2" 2> t_parse_args/test_result.log +LOG=$(mktemp) || exit 1 +trap 'cat $LOG && rm -f "$LOG"' EXIT INT HUP TERM + +$blaar_dir/compile.sh t_parse_args 2>&1> $LOG +$blaar_dir/bin/t_parse_args "arg1" "arg2" 2> t_parse_args/test_result.log git diff --exit-code t_parse_args/test_result.log || { echo "ERROR: The result of 't_parse_args' is not the one expected"; exit 3; } echo echo "- t_parse_args: compilation:OK, execution:OK, result OK" -- GitLab