diff options
author | Darren Tucker <dtucker@dtucker.net> | 2019-07-18 11:09:38 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-07-18 11:09:38 +1000 |
commit | a192021fedead23c375077f92346336d531f8cad (patch) | |
tree | 1f193999f987b637985e7464a18054525d356599 | |
parent | d1c491ecb939ee10b341fa7bb6205dff19d297e5 (diff) |
Fail tests if Valgrind enabled and reports errors.
Also dump the failing valgrind report to stdout (not the cleanest
solution, but better than nothing).
-rw-r--r-- | regress/test-exec.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index a0bff3112..f699f34d6 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -587,6 +587,21 @@ start_sshd () | |||
587 | 587 | ||
588 | # kill sshd | 588 | # kill sshd |
589 | cleanup | 589 | cleanup |
590 | |||
591 | if [ "x$USE_VALGRIND" != "x" ]; then | ||
592 | # wait for any running process to complete | ||
593 | wait; sleep 1 | ||
594 | VG_ERROR=0 | ||
595 | for i in $OBJ/valgrind-out/*; do | ||
596 | if grep "ERROR SUMMARY" $i >/dev/null && \ | ||
597 | ! grep "ERROR SUMMARY: 0 errors" $i >/dev/null; then | ||
598 | RESULT=1 | ||
599 | verbose valgrind failure $i | ||
600 | cat $i | ||
601 | fi | ||
602 | done | ||
603 | fi | ||
604 | |||
590 | if [ $RESULT -eq 0 ]; then | 605 | if [ $RESULT -eq 0 ]; then |
591 | verbose ok $tid | 606 | verbose ok $tid |
592 | else | 607 | else |