Last active
March 2, 2016 02:40
-
-
Save mlsteele/38b156aff6411acbeb49 to your computer and use it in GitHub Desktop.
Script to continously run go tests.
This file contains 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
#!/usr/bin/env bash | |
# Script to continously run go tests. | |
# Courtesy of Jon Gjengset. | |
rm -f results.log | |
while true; do | |
echo "Starting trial." | |
go test -test.timeout 80s 2>run.err | tee run.log | grep -P '^(--- )?FAIL|Passed|^Test:|^ok' | tee -a results.log; | |
if grep FAIL run.log; then | |
break; | |
fi | |
if grep panic run.err; then | |
break; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment