Skip to content

Commit

Permalink
fix zip64_test to work with absolute $(JAVABASE)
Browse files Browse the repository at this point in the history
Tested with an absolute $(JAVABASE) and --(no)legacy_external_runfiles.

Progress towards #8033

Closes #8034.

PiperOrigin-RevId: 243604034
  • Loading branch information
buchgr authored and copybara-github committed Apr 15, 2019
1 parent 4b8cfbd commit 8fe5479
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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
6 changes: 5 additions & 1 deletion src/tools/singlejar/zip64_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ else
fi

singlejar="$(rlocation "io_bazel/src/tools/singlejar/singlejar${EXE_EXT}")"
jartool="$(rlocation "local_jdk/bin/jar${EXE_EXT}")"
javabase="$1"
if [[ $javabase = external/* ]]; then
javabase=${javabase#external/}
fi
jartool="$(rlocation "${javabase}/bin/jar${EXE_EXT}")"

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

0 comments on commit 8fe5479

Please sign in to comment.