Skip to content

Commit

Permalink
Fixed an error that bazel binary is not executable when testing with …
Browse files Browse the repository at this point in the history
…remote execution.

The cmd used to package final artifact didn't produce an executable file. It worked before since we always chmod(0555) the output files of a locally executed action and always set the input files to be executable when uploading to remote cache. However, this is no longer true with b6e3ba8. Tests can't execute the generated bazel binary with remote execution due to the missing executable bit.

This change add `chmod a+x` to the cmd to make sure the final artifact is executable.

PiperOrigin-RevId: 352784262
  • Loading branch information
Googler authored and copybara-github committed Jan 20, 2021
1 parent dba2fce commit 4864850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ genrule(
# In msys, a file path without .exe suffix(say foo), refers to a file with .exe
# suffix(say foo.exe), if foo.exe exists and foo doesn't. So, on windows, we
# need to remove bazel.exe first, so that cat to bazel won't fail.
cmd = "rm -f $@; cat $(location //src/main/cpp:client) $(location :package-zip" + jdk + ") > $@ && zip -qA $@",
cmd = "rm -f $@; cat $(location //src/main/cpp:client) $(location :package-zip" + jdk + ") > $@ && zip -qA $@ && chmod a+x $@",
executable = 1,
output_to_bindir = 1,
visibility = [
Expand Down

0 comments on commit 4864850

Please sign in to comment.