Skip to content

Commit

Permalink
rerun failed tests (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarimo authored Sep 21, 2023
1 parent 04925b8 commit e2103bc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
function finish {
rm -rf rerun.txt failed.txt
rm -rf failed.txt
}
trap finish EXIT

Expand All @@ -11,10 +11,11 @@ if [ "${RECORD:-false}" == "false" ]; then
RSPEC_RESULT=$?
fi

bundle exec cucumber -f rerun -o rerun.txt -f pretty
CUCUMBER_RESULT=$?
if [ "$RERECORD_FAILED_TESTS" == "true" ] && [ "$CUCUMBER_RESULT" -ne "0" ]; then
RECORD=true bundle exec cucumber @rerun.txt
if [ "$RECORD" == "none" ]; then
bundle exec cucumber --retry 1
CUCUMBER_RESULT=$?
else
bundle exec cucumber
CUCUMBER_RESULT=$?
fi

Expand Down

0 comments on commit e2103bc

Please sign in to comment.