aboutsummaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2016-07-21 11:37:46 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2016-07-21 11:37:46 -0700
commitad49ed78f3b0d03093274450637bd060d26fb58f (patch)
tree0a8744a6db7477ed9224949bf8aaf0c2e9f13174 /tests.sh
parent30d8416c1cf69c7e349811b38a91dbc810fc66bd (diff)
downloadprotobuf-ad49ed78f3b0d03093274450637bd060d26fb58f.tar.gz
protobuf-ad49ed78f3b0d03093274450637bd060d26fb58f.tar.bz2
protobuf-ad49ed78f3b0d03093274450637bd060d26fb58f.zip
Update travis tests for Java.
1. Set JAVA_HOME so mvn can pick up the correct java version. 2. Remove jdk6 tests. It has been broken for a while and remain undetected as mvn is actually using java 7 to build the code. Given that we have set -source and -target to 6 in the pom.xml and the built .jar should be usable by java 6, having a dedicated java 6 test doesn't seem necessary (assuming very few Java 6 users want to compile protobuf Java from source). Change-Id: I4f14da772632df3e47801f180198242b306c3f0f
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh17
1 files changed, 3 insertions, 14 deletions
diff --git a/tests.sh b/tests.sh
index 4b8ef2f6..d1127508 100755
--- a/tests.sh
+++ b/tests.sh
@@ -127,13 +127,10 @@ build_golang() {
use_java() {
version=$1
case "$version" in
- jdk6)
- on_travis sudo apt-get install openjdk-6-jdk
- export PATH=/usr/lib/jvm/java-6-openjdk-amd64/bin:$PATH
- ;;
jdk7)
on_travis sudo apt-get install openjdk-7-jdk
export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH
+ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
;;
oracle7)
if [ "$TRAVIS" == "true" ]; then
@@ -144,6 +141,7 @@ use_java() {
yes | sudo apt-get install oracle-java7-installer
fi;
export PATH=/usr/lib/jvm/java-7-oracle/bin:$PATH
+ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
;;
esac
@@ -154,6 +152,7 @@ use_java() {
which java
java -version
+ $MVN -version
}
# --batch-mode supresses download progress output that spams the logs.
@@ -186,10 +185,6 @@ build_javanano() {
cd javanano && $MVN test && cd ..
}
-build_java_jdk6() {
- use_java jdk6
- build_java jdk6
-}
build_java_jdk7() {
use_java jdk7
build_java_with_conformance_tests
@@ -199,10 +194,6 @@ build_java_oracle7() {
build_java oracle7
}
-build_javanano_jdk6() {
- use_java jdk6
- build_javanano
-}
build_javanano_jdk7() {
use_java jdk7
build_javanano
@@ -346,10 +337,8 @@ if [ "$#" -ne 1 ]; then
Usage: $0 { cpp |
cpp_distcheck |
csharp |
- java_jdk6 |
java_jdk7 |
java_oracle7 |
- javanano_jdk6 |
javanano_jdk7 |
javanano_oracle7 |
objectivec_ios |