18 lines · plain
1#!/usr/bin/env bash2# This script is used to deflake inherently flaky archer tests.3# It is invoked from lit tests as:4# %deflake mybinary5# which is then substituted by lit to:6# $(dirname %s)/deflake.bash mybinary7# The script runs the target program up to 10 times,8# until it fails (i.e. produces a race report).9 10for i in $(seq 1 10); do11 OUT=`$@ 2>&1`12 if [[ $? != 0 ]]; then13 echo "$OUT"14 exit 015 fi16done17exit 118