diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-common | 27 |
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 () { |