From a0e2126be49e5eda45dcaead497129c08e08a1e5 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Mon, 4 Jun 2018 11:25:40 -0700 Subject: Refactor container_test in preparation for sandbox_test Common code to setup and run sandbox is moved to testutil. Also, don't link "boot" and "gofer" commands with test binary. Instead, use runsc binary from the build. This not only make the test setup simpler, but also resolves a dependency issue with sandbox_tests not depending on container package. PiperOrigin-RevId: 199164478 Change-Id: I27226286ca3f914d4d381358270dd7d70ee8372f --- runsc/test/testutil/BUILD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 runsc/test/testutil/BUILD (limited to 'runsc/test/testutil/BUILD') diff --git a/runsc/test/testutil/BUILD b/runsc/test/testutil/BUILD new file mode 100644 index 000000000..2c2555d98 --- /dev/null +++ b/runsc/test/testutil/BUILD @@ -0,0 +1,17 @@ +package(licenses = ["notice"]) # Apache 2.0 + +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "testutil", + srcs = ["testutil.go"], + importpath = "gvisor.googlesource.com/gvisor/runsc/test/testutil", + visibility = [ + "//runsc:__subpackages__", + ], + deps = [ + "//runsc/boot", + "//runsc/specutils", + "@com_github_opencontainers_runtime-spec//specs-go:go_default_library", + ], +) -- cgit v1.2.3