Last active
February 23, 2016 19:26
-
-
Save kvu787/140bb678035756a3f232 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: bash gotest.sh <directory to put test results in> <count> | |
# | |
# example: | |
# cd ~/452-labs/src/paxos | |
# bash gotest.sh testdir 10 | |
# | |
# to kill a gotest.sh, run: | |
# ctrl-z (pause process) | |
# kill %% (kill most recently paused process) | |
if [ -e "$1" ]; then | |
echo "$1 already exists" | |
exit 1 | |
fi | |
mkdir $1 | |
echo -n > "$1/SUMMARY" | |
for v in $(seq -w 1 $2); | |
do | |
go test >"$1/$v.log" 2>&1 | |
if [ $? -eq '0' ]; then | |
echo "$v success" | |
echo "$v success" >> "$1/SUMMARY" | |
else | |
echo "$v fail" | |
echo "$v fail" >> "$1/SUMMARY" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment