diff --git a/tests/cli-tests.sh b/tests/cli-tests.sh index f8ff76c7..53fc76e8 100755 --- a/tests/cli-tests.sh +++ b/tests/cli-tests.sh @@ -77,3 +77,5 @@ do fi cd "$TEST_TOP" done + +"$TEST_TOP/scan-results.sh" "$RESULTS" diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh index 2e49e90f..86a5f04f 100755 --- a/tests/convert-tests.sh +++ b/tests/convert-tests.sh @@ -95,3 +95,5 @@ for i in $(find "$TEST_TOP/convert-tests" -maxdepth 1 -mindepth 1 -type d \ do run_one_test "$i" done + +"$TEST_TOP/scan-results.sh" "$RESULTS" diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh index 383099a8..8c9fb000 100755 --- a/tests/fsck-tests.sh +++ b/tests/fsck-tests.sh @@ -112,3 +112,5 @@ for i in $(find "$TEST_TOP/fsck-tests" -maxdepth 1 -mindepth 1 -type d \ do run_one_test "$i" done + +"$TEST_TOP/scan-results.sh" "$RESULTS" diff --git a/tests/fuzz-tests.sh b/tests/fuzz-tests.sh index 5a1d0399..f02f81e7 100755 --- a/tests/fuzz-tests.sh +++ b/tests/fuzz-tests.sh @@ -76,3 +76,5 @@ do fi cd "$TEST_TOP" done + +"$TEST_TOP/scan-results.sh" "$RESULTS" diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh index 0b7cb6df..efb73334 100755 --- a/tests/misc-tests.sh +++ b/tests/misc-tests.sh @@ -84,3 +84,5 @@ do fi cd "$TEST_TOP" done + +"$TEST_TOP/scan-results.sh" "$RESULTS" diff --git a/tests/mkfs-tests.sh b/tests/mkfs-tests.sh index 1928ce1d..d12ed3ef 100755 --- a/tests/mkfs-tests.sh +++ b/tests/mkfs-tests.sh @@ -79,3 +79,5 @@ do fi cd "$TEST_TOP" done + +"$TEST_TOP/scan-results.sh" "$RESULTS" diff --git a/tests/scan-results.sh b/tests/scan-results.sh index c2b71473..de86c703 100755 --- a/tests/scan-results.sh +++ b/tests/scan-results.sh @@ -3,6 +3,8 @@ # # Usage: $0 [test-log.txt] +ret=0 + scan_log() { local file="$1" @@ -10,14 +12,14 @@ scan_log() { last= while read line; do case "$line" in - ===\ START\ TEST*) last="$line" ;; - *Assertion*failed*) echo "ASSERTION FAILED: $last" ;; - *runtime\ error*) echo "RUNTIME ERROR (sanitizer): $last" ;; - *AddressSanitizer*heap-use-after-free*) echo "RUNTIME ERROR (use after free): $last" ;; - *LeakSanitizer:*leak*) echo "SANITIZER REPORT: memory leak: $last" ;; - *Warning:\ assertion*failed*) echo "ASSERTION WARNING: $last" ;; - *command\ not\ found*) echo "COMMAND NOT FOUND: $last" ;; - *extent\ buffer\ leak*) echo "EXTENT BUFFER LEAK: $last" ;; + ===\ START\ TEST*) last="$line" ;; + *Assertion*failed*) ret=1; echo "ASSERTION FAILED: $last" ;; + *runtime\ error*) ret=1; echo "RUNTIME ERROR (sanitizer): $last" ;; + *AddressSanitizer*heap-use-after-free*) ret=1; echo "RUNTIME ERROR (use after free): $last" ;; + *LeakSanitizer:*leak*) ret=1; echo "SANITIZER REPORT: memory leak: $last" ;; + *Warning:\ assertion*failed*) ret=1; echo "ASSERTION WARNING: $last" ;; + *command\ not\ found*) ret=1; echo "COMMAND NOT FOUND: $last" ;; + *extent\ buffer\ leak*) ret=1; echo "EXTENT BUFFER LEAK: $last" ;; *) : ;; esac done < "$file" @@ -26,10 +28,12 @@ scan_log() { # Scan only the given file if [ -n "$1" ]; then scan_log "$1" - exit + exit "$ret" fi # Scan all existing test logs for file in *.txt; do scan_log "$file" done + +exit "$ret"