File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 68
68
echo " Working directory: $( pwd) "
69
69
echo " Running: \" valgrind $OPTION \" for the following tests:"
70
70
71
- FAIL =0
71
+ ANY_TEST_FAILED =0
72
72
rm -f umf_test-* .log umf_test-* .err
73
73
74
74
for test in $( ls -1 umf_test-* ) ; do
@@ -121,8 +121,11 @@ for test in $(ls -1 umf_test-*); do
121
121
122
122
[ " $FILTER " != " " ] && echo -n " ($FILTER ) "
123
123
124
+ LAST_TEST_FAILED=0
125
+
124
126
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
126
129
echo " (valgrind FAILED) "
127
130
echo " Command: HWLOC_CPUID_PATH=./cpuid valgrind $OPTION $OPT_SUP --gen-suppressions=all ./$test $FILTER >$LOG 2>&1"
128
131
echo " Output:"
@@ -132,17 +135,17 @@ for test in $(ls -1 umf_test-*); do
132
135
fi || true
133
136
# grep for "ERROR SUMMARY" with errors (there can be many lines with "ERROR SUMMARY")
134
137
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
136
139
echo " - OK"
137
140
rm -f $LOG $ERR
138
141
else
139
142
echo " - FAILED!"
140
143
cat $ERR | cut -d' ' -f2-
141
- FAIL =1
144
+ ANY_TEST_FAILED =1
142
145
fi || true
143
146
done
144
147
145
- [ $FAIL -eq 0 ] && echo PASSED && exit 0
148
+ [ $ANY_TEST_FAILED -eq 0 ] && echo PASSED && exit 0
146
149
147
150
echo
148
151
echo " ======================================================================"
You can’t perform that action at this time.
0 commit comments