2020-01-27 18:04:07 +00:00
|
|
|
load("//tools:defs.bzl", "go_library", "go_test")
|
2020-04-20 22:47:16 +00:00
|
|
|
load("//tools/vm:defs.bzl", "vm_test")
|
2018-10-04 03:43:18 +00:00
|
|
|
|
2019-01-31 19:11:44 +00:00
|
|
|
package(licenses = ["notice"])
|
2018-10-23 07:19:11 +00:00
|
|
|
|
2018-10-04 03:43:18 +00:00
|
|
|
go_library(
|
|
|
|
name = "root",
|
|
|
|
srcs = ["root.go"],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "root_test",
|
|
|
|
size = "small",
|
2018-10-11 18:56:42 +00:00
|
|
|
srcs = [
|
|
|
|
"cgroup_test.go",
|
|
|
|
"chroot_test.go",
|
2018-11-02 01:28:12 +00:00
|
|
|
"crictl_test.go",
|
2019-09-06 02:20:24 +00:00
|
|
|
"main_test.go",
|
|
|
|
"oom_score_adj_test.go",
|
2020-03-12 19:31:16 +00:00
|
|
|
"runsc_test.go",
|
2019-09-06 02:20:24 +00:00
|
|
|
],
|
|
|
|
data = [
|
|
|
|
"//runsc",
|
2018-10-11 18:56:42 +00:00
|
|
|
],
|
2020-01-27 18:04:07 +00:00
|
|
|
library = ":root",
|
2018-10-04 03:43:18 +00:00
|
|
|
tags = [
|
|
|
|
# Requires docker and runsc to be configured before the test runs.
|
2020-04-20 22:47:16 +00:00
|
|
|
# Also, the test needs to be run as root. Note that below, the
|
|
|
|
# root_vm_test relies on the default runtime 'runsc' being installed by
|
|
|
|
# the default installer.
|
2018-10-04 03:43:18 +00:00
|
|
|
"manual",
|
|
|
|
"local",
|
|
|
|
],
|
2019-09-04 05:01:34 +00:00
|
|
|
visibility = ["//:sandbox"],
|
2018-10-04 03:43:18 +00:00
|
|
|
deps = [
|
2020-04-23 18:32:08 +00:00
|
|
|
"//pkg/test/criutil",
|
|
|
|
"//pkg/test/dockerutil",
|
|
|
|
"//pkg/test/testutil",
|
2019-02-26 03:20:52 +00:00
|
|
|
"//runsc/cgroup",
|
2019-09-06 02:20:24 +00:00
|
|
|
"//runsc/container",
|
2018-10-04 03:43:18 +00:00
|
|
|
"//runsc/specutils",
|
2020-03-12 19:31:16 +00:00
|
|
|
"@com_github_cenkalti_backoff//:go_default_library",
|
2019-09-06 02:20:24 +00:00
|
|
|
"@com_github_opencontainers_runtime-spec//specs-go:go_default_library",
|
2018-10-04 03:43:18 +00:00
|
|
|
"@com_github_syndtr_gocapability//capability:go_default_library",
|
2020-03-12 19:31:16 +00:00
|
|
|
"@org_golang_x_sys//unix:go_default_library",
|
2018-10-04 03:43:18 +00:00
|
|
|
],
|
|
|
|
)
|
2020-04-20 22:47:16 +00:00
|
|
|
|
|
|
|
vm_test(
|
|
|
|
name = "root_vm_test",
|
2020-04-24 21:10:28 +00:00
|
|
|
size = "large",
|
2020-04-20 22:47:16 +00:00
|
|
|
shard_count = 1,
|
|
|
|
targets = [
|
|
|
|
"//tools/installers:shim",
|
|
|
|
":root_test",
|
|
|
|
],
|
|
|
|
)
|