Make source code of singlejar and ijar available from @bazel_tools. ,
Please refer to patch set 9 and its CI run for usage and test
results. In practice, users should create their own java_toolchain
rule in their project's BUILD file, and set the two attributes like
above instead of modifying //tools/jdk/BUILD.
Change-Id: Ic880f243086b00a58d453a8139ba4c957fe54bc7
PiperOrigin-RevId: 159694649
diff --git a/src/test/shell/integration/java_integration_test.sh b/src/test/shell/integration/java_integration_test.sh
index e86e90a..7c4f5d2 100755
--- a/src/test/shell/integration/java_integration_test.sh
+++ b/src/test/shell/integration/java_integration_test.sh
@@ -304,8 +304,14 @@
bazel clean || fail "Clean failed"
bazel build --nostamp //$pkg/java/hello:hello_deploy.jar \
|| fail "Build failed"
+ # TODO(bazel-team) .a files (C/C++ static library file generated by
+ # archive tool) on darwin OS only are not deterministic.
+ # https://github.com/bazelbuild/bazel/issues/3156
local -r first_run="$(md5_file $(find "${PRODUCT_NAME}-out/" -type f '!' \
- -name build-changelist.txt -a '!' -name volatile-status.txt | sort -u))"
+ -name build-changelist.txt -a '!' -name volatile-status.txt \
+ -a '!' -name stderr-* -a '!' -name *.a \
+ -a '!' -name __xcodelocatorcache -a '!' -name __xcruncache \
+ | sort -u))"
sleep 1 # Ensure the timestamp change between builds.
@@ -313,7 +319,10 @@
bazel build --nostamp //$pkg/java/hello:hello_deploy.jar \
|| fail "Build failed"
local -r second_run="$(md5_file $(find "${PRODUCT_NAME}-out/" -type f '!' \
- -name build-changelist.txt -a '!' -name volatile-status.txt | sort -u))"
+ -name build-changelist.txt -a '!' -name volatile-status.txt \
+ -a '!' -name stderr-* -a '!' -name *.a \
+ -a '!' -name __xcodelocatorcache -a '!' -name __xcruncache \
+ | sort -u))"
assert_equals "$first_run" "$second_run"
}