summaryrefslogtreecommitdiffhomepage
path: root/cmd/testwrapper/args.go
diff options
context:
space:
mode:
authorJames Sanderson <jsanderson@tailscale.com>2025-02-21 12:37:24 -0800
committerJames Sanderson <jsanderson@tailscale.com>2025-02-21 12:37:24 -0800
commit1fb4aa0545aa749420de9f2c2e1841d85efabe15 (patch)
tree6d56ed5b8ecd433063abc9d56bd4b2cd5c493d7a /cmd/testwrapper/args.go
parent1d035db4df78bcca717417ec45cecfaf4d12ee1d (diff)
downloadtailscale-zofrex/testwrapper-json-output.tar.xz
tailscale-zofrex/testwrapper-json-output.zip
cmd/testwrapper: add -json option to emit json test resultszofrex/testwrapper-json-output
Signed-off-by: James Sanderson <jsanderson@tailscale.com>
Diffstat (limited to 'cmd/testwrapper/args.go')
-rw-r--r--cmd/testwrapper/args.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/testwrapper/args.go b/cmd/testwrapper/args.go
index 95157bc34..d374172ec 100644
--- a/cmd/testwrapper/args.go
+++ b/cmd/testwrapper/args.go
@@ -89,6 +89,7 @@ func newTestFlagSet() *flag.FlagSet {
// TODO(maisem): figure out what other flags we need to register explicitly.
fs.String("exec", "", "Command to run tests with")
fs.Bool("race", false, "build with race detector")
+ fs.Bool("json", false, "json output")
return fs
}
@@ -112,3 +113,12 @@ var testingVerbose = func() bool {
}
return verbose
}()
+
+func testingJson(goTestArgs []string) bool {
+ for _, arg := range goTestArgs {
+ if arg == "-json" {
+ return true
+ }
+ }
+ return false
+}