From 338dc56eae94efcaaf67850dcf9424314ea5b72e Mon Sep 17 00:00:00 2001 From: Damien Martin-Guillerez Date: Tue, 23 Jun 2015 17:15:12 +0000 Subject: Disable tests that requires JDK 8 when using compile.sh Also fix the OS X travis build file. -- MOS_MIGRATED_REVID=96683399 --- compile.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'compile.sh') diff --git a/compile.sh b/compile.sh index cf123779be..bb93313949 100755 --- a/compile.sh +++ b/compile.sh @@ -157,7 +157,20 @@ fi if [ $DO_TESTS ]; then new_step "Running tests" display "." + [ -n "$JAVAC_VERSION" ] || get_java_version + if [[ ! "${BAZEL_TEST_FILTERS-}" =~ "-jdk8" ]] \ + && [ "8" -gt ${JAVAC_VERSION#*.} ]; then + display "$WARNING Your version of Java is lower than 1.8!" + display "$WARNING Deactivating Java 8 tests, please use a JDK 8 to fully" + display "$WARNING test Bazel." + if [ -n "${BAZEL_TEST_FILTERS-}" ]; then + BAZEL_TEST_FILTERS="${BAZEL_TEST_FILTERS},-jdk8" + else + BAZEL_TEST_FILTERS="-jdk8" + fi + fi $BAZEL --blazerc=${BAZELRC} --nomaster_blazerc test \ + --test_tag_filters="${BAZEL_TEST_FILTERS-}" \ --build_tests_only \ --javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \ -k --test_output=errors //src/... //third_party/ijar/... //scripts/... \ -- cgit v1.2.3