Skip to content

Commit 4864850

Browse files
Googlercopybara-github
Googler
authored andcommitted
Fixed an error that bazel binary is not executable when testing with 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
1 parent dba2fce commit 4864850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ genrule(
385385
# In msys, a file path without .exe suffix(say foo), refers to a file with .exe
386386
# suffix(say foo.exe), if foo.exe exists and foo doesn't. So, on windows, we
387387
# need to remove bazel.exe first, so that cat to bazel won't fail.
388-
cmd = "rm -f $@; cat $(location //src/main/cpp:client) $(location :package-zip" + jdk + ") > $@ && zip -qA $@",
388+
cmd = "rm -f $@; cat $(location //src/main/cpp:client) $(location :package-zip" + jdk + ") > $@ && zip -qA $@ && chmod a+x $@",
389389
executable = 1,
390390
output_to_bindir = 1,
391391
visibility = [

0 commit comments

Comments
 (0)