Paste P229

Masterwork From Distant Lands
ActivePublic

Authored by dkazakov on Jun 2 2018, 8:13 PM.
#!/bin/bash
if [ ${2:-"UNSET"} == "UNSET" ] ; then
COUNT=99
PROGNAME=$1
KILL_FIRST_FAIL=true
else
COUNT=$1
PROGNAME=$2
KILL_FIRST_FAIL=false
fi
for i in `seq 1 $COUNT`; do
echo "Running: $i cycle"
$PROGNAME $3 $4 $5 $6 $7 2>&1 > __run_test_log
RETVAL=$?
if [ $RETVAL -ne "0" ] ; then
echo "FAILED"
echo
cat __run_test_log
echo
if [ $KILL_FIRST_FAIL == "true" ] ; then
break
fi
fi
done
rm __run_test_log
echo "Done"
dkazakov edited the content of this paste. (Show Details)Jun 2 2018, 8:13 PM
dkazakov changed the title of this paste from untitled to Masterwork From Distant Lands.
dkazakov updated the paste's language from autodetect to autodetect.