Skip to content

Commit

Permalink
Revert "ci: abort all tests immediately when one fails"
Browse files Browse the repository at this point in the history
This reverts commit 43d4255,
totally half-baked
  • Loading branch information
altergui authored and p4u committed May 29, 2023
1 parent 2f753a5 commit 905732b
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions dockerfiles/testsuite/start_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,29 +163,21 @@ for test in ${tests_to_run[@]}; do
done

log "### Waiting for tests to finish ###"
wait

wait_jobs() {
while [ -n "$(jobs)" ]; do
for file in $results/*.retval ; do
test=$(basename $file .retval)
RET=$(cat $file)
if [ "$RET" == "0" ] ; then
log "### Vochain test $test finished correctly! ###"
rm $file
else
log "### Vochain test $test failed! (aborting all tests) ###"
$COMPOSE_CMD down
log "### Post run logs ###"
$COMPOSE_CMD logs --tail 1000
failed="$test"
return
fi
done
sleep 1
done
}

wait_jobs
failed=""
for test in ${tests_to_run[@]} ; do
RET=$(cat $results/$test.retval)
if [ "$RET" == "0" ] ; then
log "### Vochain test $test finished correctly! ###"
else
log "### Vochain test $test failed! ###"
log "### Post run logs ###"
$COMPOSE_CMD logs --tail 1000
failed="$test"
break
fi
done

if [ -n "$GOCOVERDIR" ] ; then
log "### Collect all coverage files in $GOCOVERDIR ###"
Expand Down

0 comments on commit 905732b

Please sign in to comment.