11#! /bin/bash
2- # Copyright 2019 Google LLC
2+ # Copyright 2025 Google LLC
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
66# You may obtain a copy of the License at
77#
8- # http ://www.apache.org/licenses/LICENSE-2.0
8+ # https ://www.apache.org/licenses/LICENSE-2.0
99#
1010# Unless required by applicable law or agreed to in writing, software
1111# distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,6 +42,7 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
4242 export GOOGLE_APPLICATION_CREDENTIALS=$( realpath ${KOKORO_GFILE_DIR} /${GOOGLE_APPLICATION_CREDENTIALS} )
4343fi
4444
45+
4546RETURN_CODE=0
4647set +e
4748
@@ -60,24 +61,14 @@ javadoc)
6061 RETURN_CODE=$?
6162 ;;
6263integration)
63- # Kokoro integration tests use both JDK 11 and JDK 8. Integration
64- # tests require JDK 11 export as JAVA env variable to run cloud datastore
65- # emulator (https://cloud.google.com/sdk/docs/release-notes#39300_2022-07-12).
66- # For Java 8 environment, we will still run the tests using Java 8 with
67- # SUREFIRE_JVM_OPT for Maven surefire plugin:
68- # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
69- if [[ -n " ${JAVA11_HOME} " && -n " ${JAVA8_HOME} " ]]
70- then
71- export JAVA=${JAVA11_HOME} /bin/java
72- export SUREFIRE_JVM_OPT=-Djvm=${JAVA8_HOME} /bin/java
73- fi
74-
7564 mvn -B ${INTEGRATION_TEST_ARGS} \
7665 -ntp \
7766 -Penable-integration-tests \
7867 -DtrimStackTrace=false \
7968 -Dclirr.skip=true \
8069 -Denforcer.skip=true \
70+ -Dcheckstyle.skip=true \
71+ -DskipUnitTests=true \
8172 -fae \
8273 verify
8374 RETURN_CODE=$?
@@ -87,11 +78,6 @@ graalvm)
8778 mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
8879 RETURN_CODE=$?
8980 ;;
90- graalvm17)
91- # Run Unit and Integration Tests with Native Image
92- mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
93- RETURN_CODE=$?
94- ;;
9581samples)
9682 SAMPLES_DIR=samples
9783 # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
144130fi
145131
146132echo " exiting with ${RETURN_CODE} "
147- exit ${RETURN_CODE}
133+ exit ${RETURN_CODE}
0 commit comments