mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: move test_app in a separate directory
Opensource tools (e. g. https://github.com/fatih/vim-go) can't hanlde more than one golang package in one directory. PiperOrigin-RevId: 246435962 Change-Id: I67487915e3838762424b2d168efc54ae34fb801f
This commit is contained in:
+2
-13
@@ -1,4 +1,4 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
||||
|
||||
package(licenses = ["notice"])
|
||||
|
||||
@@ -37,8 +37,8 @@ go_test(
|
||||
"shared_volume_test.go",
|
||||
],
|
||||
data = [
|
||||
":test_app",
|
||||
"//runsc",
|
||||
"//runsc/container/test_app",
|
||||
],
|
||||
embed = [":container"],
|
||||
shard_count = 5,
|
||||
@@ -61,14 +61,3 @@ go_test(
|
||||
"@org_golang_x_sys//unix:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "test_app",
|
||||
testonly = 1,
|
||||
srcs = ["test_app.go"],
|
||||
pure = "on",
|
||||
deps = [
|
||||
"//runsc/test/testutil",
|
||||
"@com_github_google_subcommands//:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -569,7 +569,7 @@ func TestKillPid(t *testing.T) {
|
||||
for _, conf := range configs(overlay) {
|
||||
t.Logf("Running test with conf: %+v", conf)
|
||||
|
||||
app, err := testutil.FindFile("runsc/container/test_app")
|
||||
app, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
@@ -792,7 +792,7 @@ func TestUnixDomainSockets(t *testing.T) {
|
||||
}
|
||||
defer outputFile.Close()
|
||||
|
||||
app, err := testutil.FindFile("runsc/container/test_app")
|
||||
app, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
@@ -1471,7 +1471,7 @@ func TestRootNotMount(t *testing.T) {
|
||||
t.Skip("race makes test_app not statically linked")
|
||||
}
|
||||
|
||||
appSym, err := testutil.FindFile("runsc/container/test_app")
|
||||
appSym, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
@@ -1497,7 +1497,7 @@ func TestRootNotMount(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUserLog(t *testing.T) {
|
||||
app, err := testutil.FindFile("runsc/container/test_app")
|
||||
app, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ func TestMultiContainerSignal(t *testing.T) {
|
||||
// TestMultiContainerDestroy checks that container are properly cleaned-up when
|
||||
// they are destroyed.
|
||||
func TestMultiContainerDestroy(t *testing.T) {
|
||||
app, err := testutil.FindFile("runsc/container/test_app")
|
||||
app, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
@@ -533,7 +533,7 @@ func TestMultiContainerKillAll(t *testing.T) {
|
||||
{killContainer: true},
|
||||
{killContainer: false},
|
||||
} {
|
||||
app, err := testutil.FindFile("runsc/container/test_app")
|
||||
app, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
@@ -734,7 +734,7 @@ func TestMultiContainerDestroyStarting(t *testing.T) {
|
||||
// TestMultiContainerGoferStop tests that IO operations continue to work after
|
||||
// containers have been stopped and gofers killed.
|
||||
func TestMultiContainerGoferStop(t *testing.T) {
|
||||
app, err := testutil.FindFile("runsc/container/test_app")
|
||||
app, err := testutil.FindFile("runsc/container/test_app/test_app")
|
||||
if err != nil {
|
||||
t.Fatal("error finding test_app:", err)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
|
||||
|
||||
package(licenses = ["notice"])
|
||||
|
||||
go_binary(
|
||||
name = "test_app",
|
||||
testonly = 1,
|
||||
srcs = ["test_app.go"],
|
||||
pure = "on",
|
||||
visibility = ["//runsc/container:__pkg__"],
|
||||
deps = [
|
||||
"//runsc/test/testutil",
|
||||
"@com_github_google_subcommands//:go_default_library",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user