aboutsummaryrefslogtreecommitdiffstats
path: root/java/compatibility_tests
diff options
context:
space:
mode:
authorHao Nguyen <haon@google.com>2018-12-13 15:20:25 -0800
committerHao Nguyen <haon@google.com>2018-12-13 15:20:25 -0800
commit6cb87bd157876b68b41703158380298b9a03c597 (patch)
tree074471af7786d48b4380684f7f5e8241b64dab14 /java/compatibility_tests
parent5518c016a7b9088bfbb3436e352b3e8ad308c6b4 (diff)
downloadplatform_external_protobuf-6cb87bd157876b68b41703158380298b9a03c597.tar.gz
platform_external_protobuf-6cb87bd157876b68b41703158380298b9a03c597.tar.bz2
platform_external_protobuf-6cb87bd157876b68b41703158380298b9a03c597.zip
Use docker for csharp, java_compatibility, and python_compatibility. Remove prepare_build_linux_rc that is no longer needed.
Diffstat (limited to 'java/compatibility_tests')
-rwxr-xr-xjava/compatibility_tests/v2.5.0/test.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/java/compatibility_tests/v2.5.0/test.sh b/java/compatibility_tests/v2.5.0/test.sh
index 2ea5b9302..eea832850 100755
--- a/java/compatibility_tests/v2.5.0/test.sh
+++ b/java/compatibility_tests/v2.5.0/test.sh
@@ -5,6 +5,9 @@ set -ex
# Change to the script's directory.
cd $(dirname $0)
+MAVEN_LOCAL_REPOSITORY=/var/maven_local_repository
+MVN="mvn --batch-mode -e -X -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$MAVEN_LOCAL_REPOSITORY"
+
# Version of the tests (i.e., the version of protobuf from where we extracted
# these tests).
TEST_VERSION=`grep "^ <version>.*</version>" pom.xml | sed "s| <version>\(.*\)</version>|\1|"`
@@ -59,7 +62,7 @@ echo "Running compatibility tests between $VERSION_NUMBER and $OLD_VERSION"
# Build and install protobuf-java-$VERSION_NUMBER.jar
[ -f ../../core/target/protobuf-java-$VERSION_NUMBER.jar ] || {
pushd ../..
- mvn install -Dmaven.test.skip=true
+ $MVN install -Dmaven.test.skip=true
popd
}
@@ -81,7 +84,7 @@ chmod +x protoc
# Test A.1:
# protos: use new version
# more_protos: use old version
-mvn clean test \
+$MVN clean test \
-Dprotobuf.test.source.path=$(pwd)/protobuf \
-Dprotoc.path=$(pwd)/protoc \
-Dprotos.protoc.path=$(pwd)/../../../src/protoc \
@@ -90,7 +93,7 @@ mvn clean test \
# Test A.2:
# protos: use old version
# more_protos: use new version
-mvn clean test \
+$MVN clean test \
-Dprotobuf.test.source.path=$(pwd)/protobuf \
-Dprotoc.path=$(pwd)/protoc \
-Dmore_protos.protoc.path=$(pwd)/../../../src/protoc \
@@ -103,12 +106,12 @@ mvn clean test \
# make it easier to run binary compatibility test (where we will need to run
# the jar files directly).
cd deps
-mvn assembly:single
+$MVN assembly:single
cd ..
cp -f deps/target/compatibility-test-deps-${TEST_VERSION}-jar-with-dependencies.jar deps.jar
# Build the old version of all 3 artifacts.
-mvn clean install -Dmaven.test.skip=true -Dprotoc.path=$(pwd)/protoc -Dprotobuf.version=$OLD_VERSION
+$MVN clean install -Dmaven.test.skip=true -Dprotoc.path=$(pwd)/protoc -Dprotobuf.version=$OLD_VERSION
cp -f protos/target/compatibility-protos-${TEST_VERSION}.jar protos.jar
cp -f more_protos/target/compatibility-more-protos-${TEST_VERSION}.jar more_protos.jar
cp -f tests/target/compatibility-tests-${TEST_VERSION}.jar tests.jar
@@ -125,7 +128,7 @@ cd ..
# Test B.2: update protos.jar only.
cd protos
-mvn clean package -Dmaven.test.skip=true -Dprotoc.path=$(pwd)/../../../../src/protoc -Dprotobuf.version=$VERSION_NUMBER
+$MVN clean package -Dmaven.test.skip=true -Dprotoc.path=$(pwd)/../../../../src/protoc -Dprotobuf.version=$VERSION_NUMBER
cd ..
cd protobuf
java -cp ../../../core/target/protobuf-java-$VERSION_NUMBER.jar:../protos/target/compatibility-protos-${TEST_VERSION}.jar:../more_protos.jar:../tests.jar:../deps.jar org.junit.runner.JUnitCore $TESTS
@@ -133,7 +136,7 @@ cd ..
# Test B.3: update more_protos.jar only.
cd more_protos
-mvn clean package -Dmaven.test.skip=true -Dprotoc.path=$(pwd)/../../../../src/protoc -Dprotobuf.version=$VERSION_NUMBER
+$MVN clean package -Dmaven.test.skip=true -Dprotoc.path=$(pwd)/../../../../src/protoc -Dprotobuf.version=$VERSION_NUMBER
cd ..
cd protobuf
java -cp ../../../core/target/protobuf-java-$VERSION_NUMBER.jar:../protos.jar:../more_protos/target/compatibility-more-protos-${TEST_VERSION}.jar:../tests.jar:../deps.jar org.junit.runner.JUnitCore $TESTS