Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix zip64_test to work with absolute $(JAVABASE) #8034

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tools/singlejar/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ cc_test(
sh_test(
name = "zip64_test",
srcs = ["zip64_test.sh"],
args = ["$(JAVABASE)"],
data = [
":singlejar",
"//src/test/shell:bashunit",
Expand Down
10 changes: 9 additions & 1 deletion src/tools/singlejar/zip64_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ else
fi

singlejar="$(rlocation "io_bazel/src/tools/singlejar/singlejar${EXE_EXT}")"
jartool="$(rlocation "local_jdk/bin/jar${EXE_EXT}")"
javabase="$1"
if [[ $javabase = /* || $javabase =~ [A-Za-z]:[/\\] ]]; then
jartool="$1/bin/jar${EXE_EXT}"
else
if [[ $javabase = external/* ]]; then
laszlocsomor marked this conversation as resolved.
Show resolved Hide resolved
javabase=${javabase#external/}
fi
jartool="$(rlocation "${javabase}/bin/jar${EXE_EXT}")"
fi

# Test that an archive with >64K entries can be created.
function test_65Kentries() {
Expand Down