From abede0f09cb655271ece0283ae8aab2b3cf4999d Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 5 Oct 2018 20:13:17 +0200 Subject: Improve exit output message Display the tests results depending on the chosen format or inform the user of the error and displaying in that case the binder(s) log output. Change-Id: I2437d3b59ef5b864c8e41749b16bf3ed738c9caa Signed-off-by: Romain Forlot --- afm-test.target.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'afm-test.target.sh') diff --git a/afm-test.target.sh b/afm-test.target.sh index f24ca83..5038e74 100755 --- a/afm-test.target.sh +++ b/afm-test.target.sh @@ -60,16 +60,20 @@ kill -0 $pid RUNNING=$? while [[ $RUNNING -eq 0 ]] do - kill -0 $pid + kill -0 $pid 2> /dev/null RUNNING=$? sleep 0.2 done # Terminate the App -afm-util kill $pid >&2 -afm-util remove $APP >&2 +afm-util kill $pid > /dev/null +afm-util remove $APP > /dev/null # Little sed script making compliant the output of test results for ptest. -sed -r -e '/^# (S| +)/d' -e '1d' -e 's:^ok +([0-9]+)\t+(.*):PASS\: \1 \2:' -e 's:^not ok +([0-9]+)\t+(.*):FAIL\: \1 \2:' ${APP_HOME}/test_results.log +find "${APP_HOME}" -name '*tap' -exec \ +sed -r -e '/^# (S| +)/d' \ +-e '1d' \ +-e 's:^ok +([0-9]+)\t+(.*):PASS\: \1 \2:' \ +-e 's:^not ok +([0-9]+)\t+(.*):FAIL\: \1 \2:' {} \; info "$APP killed and removed" -- cgit 1.2.3-korg