mirror of
https://github.com/burrowers/garble.git
synced 2026-04-22 23:57:14 +08:00
support testing/synctest when a non-test package imports "testing" too
As spotted by scripts/check-third-party.sh, it's possible to import the testing package without using `go test`, so our previous solution to only load testing/synctest when running `go test` was not enough. Add a regression test via stdimporter in gogarble.txtar.
This commit is contained in:
Vendored
+2
@@ -91,6 +91,7 @@ import (
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -107,6 +108,7 @@ func main() {
|
||||
debug.WriteHeapDump(1)
|
||||
time.Now()
|
||||
syscall.Listen(0, 1)
|
||||
testing.MainStart(nil, nil, nil, nil, nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user