diff options
Diffstat (limited to 'test/benchmarks/fs')
-rw-r--r-- | test/benchmarks/fs/BUILD | 7 | ||||
-rw-r--r-- | test/benchmarks/fs/bazel_test.go | 9 | ||||
-rw-r--r-- | test/benchmarks/fs/fs.go | 15 |
3 files changed, 18 insertions, 13 deletions
diff --git a/test/benchmarks/fs/BUILD b/test/benchmarks/fs/BUILD index 606331895..2874cdbb3 100644 --- a/test/benchmarks/fs/BUILD +++ b/test/benchmarks/fs/BUILD @@ -4,7 +4,9 @@ package(licenses = ["notice"]) go_library( name = "fs", + testonly = 1, srcs = ["fs.go"], + deps = ["//test/benchmarks/harness"], ) go_test( @@ -17,8 +19,5 @@ go_test( "local", "manual", ], - deps = [ - "//pkg/test/dockerutil", - "//test/benchmarks/harness", - ], + deps = ["//pkg/test/dockerutil"], ) diff --git a/test/benchmarks/fs/bazel_test.go b/test/benchmarks/fs/bazel_test.go index b7915e19d..fdcac1a7a 100644 --- a/test/benchmarks/fs/bazel_test.go +++ b/test/benchmarks/fs/bazel_test.go @@ -15,16 +15,12 @@ package fs import ( "context" - "os" "strings" "testing" "gvisor.dev/gvisor/pkg/test/dockerutil" - "gvisor.dev/gvisor/test/benchmarks/harness" ) -var h harness.Harness - // Note: CleanCache versions of this test require running with root permissions. func BenchmarkABSL(b *testing.B) { // Get a machine from the Harness on which to run. @@ -97,8 +93,3 @@ func BenchmarkABSL(b *testing.B) { }) } } - -func TestMain(m *testing.M) { - h.Init() - os.Exit(m.Run()) -} diff --git a/test/benchmarks/fs/fs.go b/test/benchmarks/fs/fs.go index 27eb6c56a..e5ca28c3b 100644 --- a/test/benchmarks/fs/fs.go +++ b/test/benchmarks/fs/fs.go @@ -14,3 +14,18 @@ // Package fs holds benchmarks around filesystem performance. package fs + +import ( + "os" + "testing" + + "gvisor.dev/gvisor/test/benchmarks/harness" +) + +var h harness.Harness + +// TestMain is the main method for package fs. +func TestMain(m *testing.M) { + h.Init() + os.Exit(m.Run()) +} |