Whamcloud - gitweb
Allow sanityN.sh to be run with SANITYLOG so all tests are run and failure
authoradilger <adilger>
Mon, 26 Jan 2004 17:42:17 +0000 (17:42 +0000)
committeradilger <adilger>
Mon, 26 Jan 2004 17:42:17 +0000 (17:42 +0000)
is reported at the end.

lustre/tests/sanityN.sh

index 75dd8c3..b7cf783 100644 (file)
@@ -88,9 +88,15 @@ run_test() {
        fi
 }
 
+[ "$SANITYLOG" ] && rm -f $SANITYLOG || true
+
 error () {
-       log "FAIL: $TESTNAME $@"
-       exit 1
+       log "FAIL: $@"
+       if [ "$SANITYLOG" ]; then
+               echo "FAIL: $TESTNAME $@" >> $SANITYLOG
+       else
+               exit 1
+       fi
 }
 
 pass() {
@@ -265,3 +271,4 @@ run_test 13 "test directory page revocation ===================="
 log "cleanup: ======================================================"
 rm -rf $DIR1/[df][0-9]* $DIR1/lnk || true
 echo '=========================== finished ==============================='
+[ -f "$SANITYLOG" ] && cat $SANITYLOG && exit 1 || true