aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/internal/testsuite/testsuite.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-03 19:01:53 +0900
committerOphestra <cat@gensokyo.uk>2026-10-03 21:03:10 +0900
commitaa35067f0caeb709edd60dc76fc68ac33c3e1a25 (patch)
tree928cbdb953a31514781b4e10b43b914275087a1c /test/internal/testsuite/testsuite.go
parentf2e188c4a0f472bcbd87189f63099d2c73936789 (diff)
test/internal/testsuite: simple proc scanner
This replaces procps in the replacement test suite and enables faster and much more precise matching. Signed-off-by: Ophestra <cat@gensokyo.uk>
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: ")
}