From ddd7f46a7d2c63e06cff6cf08963313dc8942177 Mon Sep 17 00:00:00 2001 From: Jason Lunn Date: Wed, 6 Oct 2021 13:06:27 -0400 Subject: [PATCH 1/3] Create an explicit build dependency from JRuby on Java. Should prevent future flakiness if unreleased JRuby features are dependent on unreleased Java features by populating the local Maven repository with the artifacts needed when running `tests.sh jruby`. --- tests.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests.sh b/tests.sh index 71635f9f7..f25985f16 100755 --- a/tests.sh +++ b/tests.sh @@ -214,13 +214,19 @@ use_java() { # --batch-mode suppresses download progress output that spams the logs. MVN="mvn --batch-mode" -build_java() { +internal_build_java() { version=$1 dir=java_$version # Java build needs `protoc`. internal_build_cpp cp -r java $dir cd $dir && $MVN clean + # Skip tests here - callers will decide what tests they want to run + $MVN install -Dmaven.test.skip=true +} + +build_java() { + internal_build_java $1 # Skip the Kotlin tests on Oracle 7 if [ "$version" == "oracle7" ]; then $MVN test -pl bom,lite,core,util @@ -446,7 +452,8 @@ build_ruby30() { } build_jruby() { - internal_build_cpp # For conformance tests. + internal_build_cpp # For conformance tests. + internal_build_java jdk8 && cd .. # For Maven protobuf jar with local changes cd ruby && bash travis-test.sh jruby-9.2.11.1 && cd .. } From 2ed817348127b1b11b4dad86885adc959b23b866 Mon Sep 17 00:00:00 2001 From: Jason Lunn Date: Wed, 6 Oct 2021 16:40:09 -0400 Subject: [PATCH 2/3] Bug fix for oracle7 regression --- tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests.sh b/tests.sh index f25985f16..2a88e3d01 100755 --- a/tests.sh +++ b/tests.sh @@ -226,7 +226,8 @@ internal_build_java() { } build_java() { - internal_build_java $1 + version=$1 + internal_build_java $version # Skip the Kotlin tests on Oracle 7 if [ "$version" == "oracle7" ]; then $MVN test -pl bom,lite,core,util From 0d3f95d7ae56698d7938702f37030ef721b61983 Mon Sep 17 00:00:00 2001 From: Jason Lunn Date: Wed, 6 Oct 2021 17:27:43 -0400 Subject: [PATCH 3/3] Narrow the scope of the install --- tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.sh b/tests.sh index 2a88e3d01..f7397c1a1 100755 --- a/tests.sh +++ b/tests.sh @@ -222,7 +222,7 @@ internal_build_java() { cp -r java $dir cd $dir && $MVN clean # Skip tests here - callers will decide what tests they want to run - $MVN install -Dmaven.test.skip=true + $MVN install -pl util -Dmaven.test.skip=true } build_java() {