Last active
February 22, 2024 19:32
-
-
Save william-smith-skydio/1e4c008043713f0fc470c8d944ab5993 to your computer and use it in GitHub Desktop.
Bazel https://github.com/bazelbuild/bazel/issues/21474 reproducer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sh_test( | |
name = "unsandboxed_test", | |
srcs = ["unsandboxed_test.sh"], | |
# this test must be run unsandboxed | |
tags = ["no-sandbox"], | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _reproducer_aspect_impl(target, ctx): | |
output = ctx.actions.declare_file("{}.aspect_out".format(target.label.name)) | |
ctx.actions.run_shell( | |
# if sandboxing is enabled, we should only see the handful of processes in the sandboxed | |
# process namespace | |
command = 'ps > "$1"', | |
arguments = [output.path], | |
outputs = [output], | |
) | |
return [OutputGroupInfo(aspect_out = depset([output]))] | |
reproducer_aspect = aspect( | |
implementation = _reproducer_aspect_impl, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pretend we do something interesting here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# empty workspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment