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:
1 parent
73b29050b9
commit
c256daceb0
2 files changed
+8
-5
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(t *testing.T) {
|
||||
weavetest.TrimTestArgs()
|
||||
main()
|
||||
if weavetest.TrimTestArgs() {
|
||||
main()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user