aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/internal/testsuite/testsuite.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/internal/testsuite/testsuite.go')
-rw-r--r--test/internal/testsuite/testsuite.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/internal/testsuite/testsuite.go b/test/internal/testsuite/testsuite.go
index 2173509d..ef250ec8 100644
--- a/test/internal/testsuite/testsuite.go
+++ b/test/internal/testsuite/testsuite.go
@@ -1,4 +1,7 @@
// Package testsuite provides many quick-and-dirty integration testing utilities.
+//
+// Attempting to import this package outside testing causes the resulting
+// program to panic.
package testsuite
import (
@@ -8,9 +11,14 @@ import (
"os/signal"
"os/user"
"syscall"
+ "testing"
)
func init() {
+ if testing.Testing() {
+ return
+ }
+
log.SetFlags(0)
log.SetPrefix("testsuite: ")
}