don't panic when TestMain is invoked as a regular test

Just no-op instead.

This change is necessary because previously a recent build-tools
change no longer excludes prog/* from unit testing since other
projects actually do have genuine tests under there.
This commit is contained in:
Matthias Radestock committed 2017-06-25 20:49:19 +01:00
1 parent 73b29050b9
commit c256daceb0
2 files changed
+8 -5

No files matched your search

+3 -2
View File
@@ -7,6 +7,7 @@ import (
)
func TestMain(t *testing.T) {
weavetest.TrimTestArgs()
main()
if weavetest.TrimTestArgs() {
main()
}
}