diff options
author | 2015-10-02 16:31:55 +0000 | |
---|---|---|
committer | 2015-10-02 18:02:42 +0000 | |
commit | 23c725b6824e7beac753779a5abeeb44c9be3bda (patch) | |
tree | a2e6c696529731559b07ded8009fa73e425b58b4 /scripts | |
parent | 5f5991dfea02e1741de598ab207c2ece9659991d (diff) |
Fix Java 7 test suite
- Prevent test from JavaBuilder to be run (mark them as JDK8 only).
- Hack to replace the JavaBuilder target so that test that needs JavaBuilder
will depends on the pre-built binary version.
Tested: bash -c 'export JAVA_VERSION=1.7; source scripts/ci/build.sh; bazel_build'
(and verified that there is no build failure). We might still have failing
tests (worker and runfiles) but the failure seems like flakiness.
--
MOS_MIGRATED_REVID=104504123
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/build.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 6929dbfea2..2dd14e5da4 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -111,10 +111,28 @@ function setup_jdk7() { rm -f third_party/java/jdk/langtools/javac.jar curl -Ls -o tools/jdk/JavaBuilder_deploy.jar "${javabuilder_url}" curl -Ls -o third_party/java/jdk/langtools/javac.jar "${javac_url}" + # Do not use the skylark bootstrapped version of JavaBuilder export BAZEL_ARGS="--singlejar_top=//src/java_tools/singlejar:bootstrap_deploy.jar \ --genclass_top=//src/java_tools/buildjar:bootstrap_genclass_deploy.jar \ --ijar_top=//third_party/ijar" + # Skip building JavaBuilder export BAZEL_SKIP_TOOL_COMPILATION=tools/jdk/JavaBuilder_deploy.jar + # Ignore JDK8 tests + export BAZEL_TEST_FILTERS="-jdk8" + # And more ugly hack. Overwrite the BUILD file of JavaBuilder + # so we use the pre-built version in integration tests. + sed -i.bak 's/name = \"JavaBuilder\"/name = \"RealJavaBuilder\"/' \ + src/java_tools/buildjar/BUILD + rm -f src/java_tools/buildjar/BUILD.bak + cat >>src/java_tools/buildjar/BUILD <<'EOF' +genrule( + name = "JavaBuilder", + outs = ["JavaBuilder_deploy.jar"], + srcs = ["//tools/jdk:JavaBuilder_deploy.jar"], + cmd = "cp $< $@", + visibility = ["//visibility:public"], +) +EOF } # Main entry point for building bazel. |