diff options
author | Adin Scannell <ascannell@google.com> | 2020-04-28 14:45:06 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-04-28 14:46:19 -0700 |
commit | 64723470a6f0b62ec6223ff66e9c9ca70d248b61 (patch) | |
tree | 5431a72f6ae03b100416a9c8e65a261fa81f8809 /BUILD | |
parent | 42822603551e5f0c0796918abf0ce92990c80da8 (diff) |
Use existing bazeldefs with top-level BUILD file.
PiperOrigin-RevId: 308901116
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD | 61 |
1 files changed, 14 insertions, 47 deletions
@@ -1,13 +1,23 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_path", "nogo") -load("@bazel_gazelle//:def.bzl", "gazelle") +load("//tools:defs.bzl", "build_test", "gazelle", "go_path") package(licenses = ["notice"]) +exports_files(["LICENSE"]) + # The sandbox filegroup is used for sandbox-internal dependencies. package_group( name = "sandbox", - packages = [ - "//...", + packages = ["//..."], +) + +# For targets that will not normally build internally, we ensure that they are +# least build by a static BUILD test. +build_test( + name = "build_test", + targets = [ + "//test/e2e:integration_test", + "//test/image:image_test", + "//test/root:root_test", ], ) @@ -43,46 +53,3 @@ go_path( # To update the WORKSPACE from go.mod, use: # bazel run //:gazelle -- update-repos -from_file=go.mod gazelle(name = "gazelle") - -# 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:93f7e127196b9b653d39830c50f8b05d49ef6fd8739a9b5b8ab16e1df5399e50" - } - properties: { - name: "dockerAddCapabilities" - value: "SYS_ADMIN" - } - properties: { - name: "dockerPrivileged" - value: "true" - } - """, -) - -toolchain( - name = "cc-toolchain-clang-x86_64-default", - exec_compatible_with = [ - ], - target_compatible_with = [ - ], - toolchain = "@bazel_toolchains//configs/ubuntu16_04_clang/10.0.0/bazel_2.0.0/cc:cc-compiler-k8", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) |