aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2015-07-30 17:27:49 +0100
committerSteve McIntyre <steve.mcintyre@linaro.org>2015-07-30 17:27:49 +0100
commitb6b48b8a75c7ce627feb239e501b592caef840bf (patch)
tree28b9238e9b9b003824e6faf71321644766868249 /test
parent10962ada4c67683e5a76155a74a654281f15114d (diff)
Better short-format output for the terminal
Change-Id: I19aae78458e7a3ab0d47c0083730c18885fb9c44
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-common27
1 files changed, 25 insertions, 2 deletions
diff --git a/test/test-common b/test/test-common
index 01aae1c..ad68610 100755
--- a/test/test-common
+++ b/test/test-common
@@ -159,10 +159,33 @@ list_test_steps () {
}
check_test_steps () {
+ OK=1
for STEP in $(list_test_steps); do
- echo " Checking connectivity results for ${STEP}: "
- check_test_step ${STEP}
+ log "Checking connectivity results for ${STEP}: "
+ RESULT=$(check_test_step ${STEP})
+ log " $RESULT"
+ case "$RESULT" in
+ PASS*)
+ ;; # all good, do nothing
+ FAIL*)
+ echo " $STEP failed: $RESULT"
+ log " $STEP failed: $RESULT"
+ OK=0
+ ;;
+ esac
done
+ if [ $OK -eq 1 ] ; then
+ echo " PASS"
+ log "PASS"
+ else
+ echo " FAIL"
+ log "FAIL"
+ false
+ fi
+
+ # Now clean up the log file
+ sort -u ${LOGFILE} > ${LOGFILE}.1
+ mv -f ${LOGFILE}.1 ${LOGFILE}
}
check_test_step () {