aboutsummaryrefslogtreecommitdiffhomepage
path: root/compile.sh
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2015-06-23 17:15:12 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-06-24 12:08:13 +0000
commit338dc56eae94efcaaf67850dcf9424314ea5b72e (patch)
treeac67f547946518562a4e867c2a90d899ffc7be77 /compile.sh
parent9290ac6c8dac3a36a73278cb3d179704f7663782 (diff)
Disable tests that requires JDK 8 when using compile.sh
Also fix the OS X travis build file. -- MOS_MIGRATED_REVID=96683399
Diffstat (limited to 'compile.sh')
-rwxr-xr-xcompile.sh13
1 files changed, 13 insertions, 0 deletions
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/... \