Skip to content

Commit 08da292

Browse files
committed
exit on error
1 parent 97b2d4f commit 08da292

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

devops/scripts/benchmarking/benchmark.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,20 @@ process_benchmarks() {
137137
}
138138

139139
process_results() {
140+
fail=0
140141
if [ -s "$BENCHMARK_SLOW_LOG" ]; then
141142
printf "\n### Tests performing over acceptable range of average: ###\n"
142143
cat "$BENCHMARK_SLOW_LOG"
143144
echo ""
145+
fail=1
144146
fi
145147
if [ -s "$BENCHMARK_ERROR_LOG" ]; then
146148
printf "\n### Tests that failed to run: ###\n"
147149
cat "$BENCHMARK_ERROR_LOG"
148150
echo ""
151+
fail=2
149152
fi
150-
if [ -s "$BENCHMARKING_SLOW_LOG" ] || [ -s "$BENCHMARK_ERROR_LOG" ]; then
151-
exit 1
152-
fi
153+
exit fail
153154
}
154155

155156
cleanup() {

0 commit comments

Comments
 (0)