summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2021-05-14 15:13:23 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-14 15:15:47 -0700
commitf8d79e94e6fbb44af264394fd96a7c7cca62f98b (patch)
tree64e22087b2ff6af46ea6a5863eb57b8baf06c13c /test
parent894187b2c6edbe367135670fb53f2e3f3d24535d (diff)
Add hash15 label for tests.
PiperOrigin-RevId: 373875071
Diffstat (limited to 'test')
-rw-r--r--test/runner/defs.bzl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/runner/defs.bzl b/test/runner/defs.bzl
index 2a0ef2cec..416f51935 100644
--- a/test/runner/defs.bzl
+++ b/test/runner/defs.bzl
@@ -88,6 +88,12 @@ def _syscall_test(
tags = list(tags)
tags += [full_platform, "file_" + file_access]
+ # Hash this target into one of 15 buckets. This can be used to
+ # randomly split targets between different workflows.
+ hash15 = hash(native.package_name() + name) % 15
+ tags.append("hash15:" + str(hash15))
+ tags.append("hash15")
+
# Disable off-host networking.
tags.append("requires-net:loopback")
tags.append("requires-net:ipv4")