Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I've been wanting to do this for ages to catch/fix flaky tests sooner, but the tests were always too flaky and/or too slow (especially with the old vmactions), but now it seems to work quite well.
- Loading branch information
Showing
7 changed files
with
71 additions
and
75 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,6 @@ jobs: | |
esac | ||
esac | ||
go test -c | ||
go build ./cmd/fsnotify | ||
go test -c || exit 1 | ||
go build ./cmd/fsnotify || exit 1 | ||
done |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
set -euC | ||
|
||
go=${GO:-go} | ||
race='-race' | ||
par= | ||
cnt=${GO_COUNT:-10} | ||
[ -n "${GO_NORACE:-}" ] && race= | ||
[ -n "${GO_NOPARALLEL:-}" ] && par='-parallel=1' | ||
|
||
|
||
# Run tests once for quick exit if something is just wrong; then run it ten | ||
# times to catch flaky tests. | ||
set -x | ||
$go test $race $par -count=1 ./... || exit 1 | ||
env FSNOTIFY_BUFFER=4096 $go test $race $par ./... || exit 1 | ||
$go test $race $par -count=$cnt ./... || exit 1 |
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