From d340305dcc7bf35f0099e9a20c0c90b046d201b4 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Sat, 2 Sep 2017 11:38:20 +0200 Subject: [PATCH] Show tpkg execution live --- .../400-static-analysis.test | 7 +++++- src/test/tpkg/tpkg | 22 +++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.test b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.test index 3f20de67..f68b2bbe 100644 --- a/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.test +++ b/src/test/tpkg/400-static-analysis.tpkg/400-static-analysis.test @@ -6,4 +6,9 @@ cd "${BUILDDIR}/build-static-analysis" scan-build -o ../scan-build-reports -v --status-bugs make -j 4 everything -scp -o "StrictHostKeyChecking no" -i ./400-static-analysis -r ../scan-build-reports static-analysis@getdnsapi.net:scan-build-resports-$$-`date +%s` +cd .. +pwd +echo scp -o "StrictHostKeyChecking no" -i ./400-static-analysis -r scan-build-reports static-analysis@getdnsapi.net:scan-build-resports-$$-`date +%s` +scp -o "StrictHostKeyChecking no" -i ./400-static-analysis -r scan-build-reports static-analysis@getdnsapi.net:scan-build-resports-$$-`date +%s` +echo Copy done + diff --git a/src/test/tpkg/tpkg b/src/test/tpkg/tpkg index 3e6deee0..62d81a16 100755 --- a/src/test/tpkg/tpkg +++ b/src/test/tpkg/tpkg @@ -89,9 +89,9 @@ function epoch() { function post() { if [ -f "${dsc_post}" ]; then err "[log] Executing post script: ${dsc_post} ${TPKG_ARGS}" - echo "--------- Start Post Output ------------------ " >> result.$dsc_basename - ${SHELL} ${dsc_post} ${TPKG_ARGS} >> result.$dsc_basename - echo "----------- End Post Output ------------------ " >> result.$dsc_basename + echo "--------- Start Post Output ------------------ " | tee -a result.$dsc_basename + ${SHELL} ${dsc_post} ${TPKG_ARGS} | tee -a result.$dsc_basename + echo "----------- End Post Output ------------------ " | tee -a result.$dsc_basename result=$? if [ $result -ne 0 ]; then err "[warning] Post-script executed with errors: $result." @@ -102,9 +102,9 @@ function post() { function pre() { if [ -f "${dsc_pre}" ]; then err "[log] Executing pre script: ${dsc_pre} ${TPKG_ARGS}" - echo "--------- Start Pre Output ------------------- " >> result.$dsc_basename - ${SHELL} ${dsc_pre} ${TPKG_ARGS} >> result.$dsc_basename - echo "----------- End Pre Output ------------------- " >> result.$dsc_basename + echo "--------- Start Pre Output ------------------- " | tee -a result.$dsc_basename + ${SHELL} ${dsc_pre} ${TPKG_ARGS} | tee -a result.$dsc_basename + echo "----------- End Pre Output ------------------- " | tee -a result.$dsc_basename result=$? if [ $result -ne 0 ]; then err "[warning] Pre-script executed with errors: $result." @@ -838,16 +838,16 @@ fi tpkg_log "Starting test: '$dsc_basename'" epoch # run before pre() -echo "BaseName: $dsc_basename" > result.$dsc_basename -echo "Description: $dsc_description" >> result.$dsc_basename -echo "DateRunStart: $epoch " >> result.$dsc_basename -echo "--------------- Test Output ------------------" >> result.$dsc_basename +echo "BaseName: $dsc_basename" | tee result.$dsc_basename +echo "Description: $dsc_description" | tee -a result.$dsc_basename +echo "DateRunStart: $epoch " | tee -a result.$dsc_basename +echo "--------------- Test Output ------------------" | tee -a result.$dsc_basename pre out "[log] Executing test" -( ${SHELL} $dsc_test ${TPKG_ARGS} 2>&1 ) >> result.$dsc_basename +( ${SHELL} $dsc_test ${TPKG_ARGS} 2>&1 ) | tee -a result.$dsc_basename test_result=$? epoch # would like to run after post, but that is not possible :-( if [ $test_result -ne 0 ]; then