From 61ed9efa90be1e84ed16683592bd89f434c881d7 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Jul 03 2014 11:14:55 +0000 Subject: [run-tests] Rewrite return code handling again We were testing return code of tee instead of subshell previous so errors went by unnoticed. This version redirects to log file and runs tail while waiting for a subshell to finish --- diff --git a/test/run-tests b/test/run-tests index 77369bf..d20721b 100755 --- a/test/run-tests +++ b/test/run-tests @@ -50,7 +50,7 @@ cd $(dirname $(readlink -fn $0)) cd .. logfile="$PWD/dist/build.log" -tee $logfile < <( { +( { if [[ -n "$PIP_INSTALL" || ! -d fedorareviewenv ]]; then install_virtenv fi @@ -92,7 +92,10 @@ tee $logfile < <( { pep8 --config pep8.conf src/FedoraReview plugins fi exit $status -} 2>&1 ) +} 2>&1 ) & > $logfile +testpid=$! +tail -f $logfile --pid=$testpid +wait $testpid exit $?