Skip to content

Commit

Permalink
Use a timeout of 1s when testing the sandbox on Linux.
Browse files Browse the repository at this point in the history
This is to avoid hanging there forever in case the system is set up
incorrectly.
1s should be plenty to run `/bin/true`.

Fixes bazelbuild#15373.
  • Loading branch information
meisterT committed May 6, 2022
1 parent eb251ca commit fdc7374
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static boolean isSupported(final CommandEnvironment cmdEnv) throws Interr
private static boolean computeIsSupported(CommandEnvironment cmdEnv, Path linuxSandbox)
throws InterruptedException {
ImmutableList<String> linuxSandboxArgv =
LinuxSandboxUtil.commandLineBuilder(linuxSandbox, ImmutableList.of("/bin/true")).build();
LinuxSandboxUtil.commandLineBuilder(linuxSandbox, ImmutableList.of("-T", "1", "--", "/bin/true")).build();
ImmutableMap<String, String> env = ImmutableMap.of();
Path execRoot = cmdEnv.getExecRoot();
File cwd = execRoot.getPathFile();
Expand Down

0 comments on commit fdc7374

Please sign in to comment.