Repository: kudu Updated Branches: refs/heads/master 86116e4c5 -> cdf0fee49
build-and-test.sh: only rerun Spark tests if Java build passes Otherwise, the output of a failing Spark test from the first build is overwritten by the second build. The alternative is to configure Maven to use a different build directory [1] for the second build, but I think that's more trouble than it's worth. 1. https://stackoverflow.com/questions/3908013/maven-how-to-change-path-to-target-directory-from-command-line Change-Id: Ief21061be0615ca4d9d8980430f4982c8c43d77c Reviewed-on: http://gerrit.cloudera.org:8080/7090 Tested-by: Adar Dembo <[email protected]> Reviewed-by: Dan Burkert <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/cdf0fee4 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/cdf0fee4 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/cdf0fee4 Branch: refs/heads/master Commit: cdf0fee49d08e74e7215a9e2a8fbd2baf2d9c2b3 Parents: 86116e4 Author: Adar Dembo <[email protected]> Authored: Mon Jun 5 16:34:28 2017 -0700 Committer: Adar Dembo <[email protected]> Committed: Tue Jun 6 20:29:44 2017 +0000 ---------------------------------------------------------------------- build-support/jenkins/build-and-test.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/cdf0fee4/build-support/jenkins/build-and-test.sh ---------------------------------------------------------------------- diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh index c24a104..8346472 100755 --- a/build-support/jenkins/build-and-test.sh +++ b/build-support/jenkins/build-and-test.sh @@ -353,20 +353,26 @@ if [ "$BUILD_JAVA" == "1" ]; then pushd $SOURCE_ROOT/java export TSAN_OPTIONS="$TSAN_OPTIONS suppressions=$SOURCE_ROOT/build-support/tsan-suppressions.txt history_size=7" set -x + + # Run the full Maven build (with Spark 2.x). if ! mvn $MVN_FLAGS \ -Dsurefire.rerunFailingTestsCount=3 \ -Dfailsafe.rerunFailingTestsCount=3 \ clean verify ; then EXIT_STATUS=1 FAILURES="$FAILURES"$'Java build/test failed\n' + else + # If there were no failures, remove the Spark output and rerun the build, + # this time just to test Spark 1.x with Scala 2.10. + # + # Note: this won't work if there are ever Spark integration tests! + rm -rf kudu-spark/target/ + if ! mvn $MVN_FLAGS -Pspark_2.10 -Dtest="org.apache.kudu.spark.*.*" test; then + EXIT_STATUS=1 + FAILURES="$FAILURES"$'spark build/test failed\n' + fi fi - # Test kudu-spark with Spark 1.x + Scala 2.10 profile - # This won't work if there are ever Spark integration tests! - rm -rf kudu-spark/target/ - if ! mvn $MVN_FLAGS -Pspark_2.10 -Dtest="org.apache.kudu.spark.*.*" test; then - EXIT_STATUS=1 - FAILURES="$FAILURES"$'spark build/test failed\n' - fi + set +x popd fi
