File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 6868echo " Working directory: $( pwd) "
6969echo " Running: \" valgrind $OPTION \" for the following tests:"
7070
71- FAIL =0
71+ ANY_TEST_FAILED =0
7272rm -f umf_test-* .log umf_test-* .err
7373
7474for test in $( ls -1 umf_test-* ) ; do
@@ -121,8 +121,11 @@ for test in $(ls -1 umf_test-*); do
121121
122122 [ " $FILTER " != " " ] && echo -n " ($FILTER ) "
123123
124+ LAST_TEST_FAILED=0
125+
124126 if ! HWLOC_CPUID_PATH=./cpuid valgrind $OPTION $OPT_SUP --gen-suppressions=all ./$test $FILTER > $LOG 2>&1 ; then
125- FAIL=1
127+ LAST_TEST_FAILED=1
128+ ANY_TEST_FAILED=1
126129 echo " (valgrind FAILED) "
127130 echo " Command: HWLOC_CPUID_PATH=./cpuid valgrind $OPTION $OPT_SUP --gen-suppressions=all ./$test $FILTER >$LOG 2>&1"
128131 echo " Output:"
@@ -132,17 +135,17 @@ for test in $(ls -1 umf_test-*); do
132135 fi || true
133136 # grep for "ERROR SUMMARY" with errors (there can be many lines with "ERROR SUMMARY")
134137 grep -e " ERROR SUMMARY:" $LOG | grep -v -e " ERROR SUMMARY: 0 errors from 0 contexts" > $ERR || true
135- if [ $( cat $ERR | wc -l) -eq 0 ]; then
138+ if [ $LAST_TEST_FAILED -eq 0 -a $ ( cat $ERR | wc -l) -eq 0 ]; then
136139 echo " - OK"
137140 rm -f $LOG $ERR
138141 else
139142 echo " - FAILED!"
140143 cat $ERR | cut -d' ' -f2-
141- FAIL =1
144+ ANY_TEST_FAILED =1
142145 fi || true
143146done
144147
145- [ $FAIL -eq 0 ] && echo PASSED && exit 0
148+ [ $ANY_TEST_FAILED -eq 0 ] && echo PASSED && exit 0
146149
147150echo
148151echo " ======================================================================"
You can’t perform that action at this time.
0 commit comments