diff options
author | Zach Koopmans <zkoopmans@google.com> | 2020-11-10 11:25:17 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-10 11:27:50 -0800 |
commit | 267d18408461350e41d914467608dfc418e61f05 (patch) | |
tree | 93bfb7e11fc20ddcb11b01d005ff65af96fcbe9b /test/benchmarks/harness | |
parent | e998b9904f35cca5df468e11a7da7c2d7de5f0e7 (diff) |
Add all base and fs tests to Continuous Tests.
PiperOrigin-RevId: 341660511
Diffstat (limited to 'test/benchmarks/harness')
-rw-r--r-- | test/benchmarks/harness/harness.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/benchmarks/harness/harness.go b/test/benchmarks/harness/harness.go index 68bd7b4cf..e14cce987 100644 --- a/test/benchmarks/harness/harness.go +++ b/test/benchmarks/harness/harness.go @@ -17,17 +17,31 @@ package harness import ( "flag" + "fmt" + "os" "gvisor.dev/gvisor/pkg/test/dockerutil" ) +var ( + help = flag.Bool("help", false, "print this usage message") +) + // Harness is a handle for managing state in benchmark runs. type Harness struct { } // Init performs any harness initilialization before runs. func (h *Harness) Init() error { + flag.Usage = func() { + fmt.Fprintf(os.Stderr, "Usage: %s -- --test.bench=<regex>\n", os.Args[0]) + flag.PrintDefaults() + } flag.Parse() + if flag.NFlag() == 0 || *help { + flag.Usage() + os.Exit(0) + } dockerutil.EnsureSupportedDockerVersion() return nil } |