Fix travis configuration for JDK 8

This is a replay of the changes from https://bazel-review.googlesource.com/#/c/1520
and that didn't got imported on the import CL.

--
MOS_MIGRATED_REVID=96099800
diff --git a/compile.sh b/compile.sh
index 6bffcd2..aaa4ba6 100755
--- a/compile.sh
+++ b/compile.sh
@@ -154,6 +154,7 @@
   new_step "Running tests"
   display "."
   $BAZEL --blazerc=${BAZELRC} --nomaster_blazerc test \
+      --build_tests_only \
       --javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
       -k --test_output=errors //src/... //third_party/ijar/... //scripts/... \
       || fail "Tests failed"