diff --git build-support/scripts/test.sh build-support/scripts/test.sh index 13b68b9..953debe 100755 --- build-support/scripts/test.sh +++ build-support/scripts/test.sh @@ -18,10 +18,17 @@ if [ "${FORREST_HOME}" == "" ]; then exit 1 fi +# Allow users to specify their ant version by setting ANT_HOME. +# Defaults to "ant" on the path. +ANT=ant +if [ "${ANT_HOME}" != "" ]; then + ANT=${ANT_HOME}/bin/ant +fi + umask 0022 env -cmd='ant clean src-release' +cmd="$ANT clean src-release" run_cmd cd build @@ -30,14 +37,13 @@ cd hcatalog-src-* echo "Running tests from $(pwd)" # Build with hadoop23, but do not run tests as they do not pass. -cmd='ant -v clean package -Dmvn.hadoop.profile=hadoop23' +cmd="$ANT -v clean package -Dmvn.hadoop.profile=hadoop23" run_cmd # Build and run tests with hadoop20. This must happen afterwards so test results # are available for CI to publish. -cmd='ant -v -Dtest.junit.output.format=xml clean package test' +cmd="$ANT -v -Dtest.junit.output.format=xml clean package test" if [ "${HUDSON_URL}" == "https://builds.apache.org/" ]; then cmd="${cmd} mvn-deploy" fi run_cmd -