summaryrefslogtreecommitdiffhomepage
path: root/test/BUILD
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-02-11 12:42:20 -0800
committerShentubot <shentubot@google.com>2019-02-11 12:43:38 -0800
commitecce96bab56de3aedd7d5cf47a6981f0f56acba1 (patch)
tree67dc95abad53f0fbda9a4865a21457f034472cb5 /test/BUILD
parentefe5e737d7da48e6f99a1d9a53fe04b6d21b7511 (diff)
gvisor: Run syscall tests in kokoro on the rbe cluster
PiperOrigin-RevId: 233458853 Change-Id: I92c734b8075aa31e040fe7b4770bcf608e271e7a
Diffstat (limited to 'test/BUILD')
-rw-r--r--test/BUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/BUILD b/test/BUILD
new file mode 100644
index 000000000..2beb8f7fb
--- /dev/null
+++ b/test/BUILD
@@ -0,0 +1,52 @@
+# gVisor is a general-purpose sandbox.
+
+package(licenses = ["notice"])
+
+exports_files(["LICENSE"])
+
+# We need to define a bazel platform and toolchain to specify dockerPrivileged
+# and dockerRunAsRoot options, they are required to run tests on the RBE
+# cluster in Kokoro.
+alias(
+ name = "rbe_ubuntu1604",
+ actual = ":rbe_ubuntu1604_r346485",
+)
+
+platform(
+ name = "rbe_ubuntu1604_r346485",
+ constraint_values = [
+ "@bazel_tools//platforms:x86_64",
+ "@bazel_tools//platforms:linux",
+ "@bazel_tools//tools/cpp:clang",
+ "@bazel_toolchains//constraints:xenial",
+ "@bazel_toolchains//constraints/sanitizers:support_msan",
+ ],
+ remote_execution_properties = """
+ properties: {
+ name: "container-image"
+ value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:f3120a030a19d67626ababdac79cc787e699a1aa924081431285118f87e7b375"
+ }
+ properties: {
+ name: "dockerAddCapabilities"
+ value: "SYS_ADMIN"
+ }
+ properties: {
+ name: "dockerPrivileged"
+ value: "true"
+ }
+ properties: {
+ name: "dockerRunAsRoot"
+ value: "true"
+ }
+ """,
+)
+
+toolchain(
+ name = "cc-toolchain-clang-x86_64-default",
+ exec_compatible_with = [
+ ],
+ target_compatible_with = [
+ ],
+ toolchain = "@bazel_toolchains//configs/ubuntu16_04_clang/1.1/bazel_0.20.0/default:cc-compiler-k8",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+)