Commit 4da28ddc authored by Albert Salim's avatar Albert Salim

Merge branch 'pl-rspec-bisect-flaky' into 'master'

Exit immediately if running minimal reproduction fails

See merge request gitlab-org/gitlab!79453
parents 5c04cf4d ff5624b1
......@@ -10,20 +10,20 @@ if [ $# -eq 0 ]; then
exit
fi
files=( $@ )
files=( "$@" )
len=${#files[@]}
target=${files[$len-1]}
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit 2;" SIGINT SIGTERM
# Show which set of specs are running
set -x
# Show which set of specs are running and exit immediately if they fail.
set -xe
# Do the speedy case first, run each spec with our failing spec
for file in "${files[@]}"; do
bin/rspec $file $target
bin/rspec "$file" "$target"
done
# Do a full bisect given we did not find candidates with speedy cases
bin/rspec --bisect=verbose $@
bin/rspec --bisect=verbose "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment