summaryrefslogtreecommitdiffhomepage
path: root/test/root
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-04-20 15:47:16 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-20 15:48:27 -0700
commit1a597e01bed5d5fb30b3d444e0a23669c5587235 (patch)
tree9fb4a801399ba8713fc6c3d2b79046f26e06023a /test/root
parent07b1b4cc98552a7d45d673ce1e4d1222bbffca7d (diff)
Add a functional vm_test for root_test.
This change renames the tools/images directory to tools/vm for clarity, and adds a functional vm_test. Sharding is also added to the same test, and some documentation added around key flags & variables to describe how they work. Subsequent changes will add vm_tests for other cases, such as the runtime tests. PiperOrigin-RevId: 307492245
Diffstat (limited to 'test/root')
-rw-r--r--test/root/BUILD14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/root/BUILD b/test/root/BUILD
index ddc9b4955..05166673a 100644
--- a/test/root/BUILD
+++ b/test/root/BUILD
@@ -1,4 +1,5 @@
load("//tools:defs.bzl", "go_library", "go_test")
+load("//tools/vm:defs.bzl", "vm_test")
package(licenses = ["notice"])
@@ -24,7 +25,9 @@ go_test(
library = ":root",
tags = [
# Requires docker and runsc to be configured before the test runs.
- # Also test only runs as root.
+ # 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.
"manual",
"local",
],
@@ -44,3 +47,12 @@ go_test(
"@org_golang_x_sys//unix:go_default_library",
],
)
+
+vm_test(
+ name = "root_vm_test",
+ shard_count = 1,
+ targets = [
+ "//tools/installers:shim",
+ ":root_test",
+ ],
+)