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 bazelbuild#8033
  • Loading branch information
buchgr committed Apr 15, 2019
1 parent 6f90d01 commit 88c4e7b
Show file tree
Hide file tree
Showing 2 changed files with 10 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
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 = /* ]]; then
jartool="$1/bin/jar${EXE_EXT}"
else
if [[ $javabase = external/* ]]; then
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

0 comments on commit 88c4e7b

Please sign in to comment.