Repository: incubator-impala Updated Branches: refs/heads/master 3be113cb9 -> 08636ace0
IMPALA-3229: Don't assume that AUX exists just because of shell env This caused breakage of the custom cluster tests - bin/impala-config.sh sets IMPALA_AUX_TEST_HOME to $IMPALA_HOME/../Impala-auxiliary-tests, unless it is already set, but this directory is not guaranteed to exist. bin/run-custom-cluster-tests.sh was expecting that if IMPALA_AUX_TEST_HOME is set, then that directory must exist. While I'm changing bin/run-custom-cluster-tests.sh, add some quotes to protect against paths with spaces in them. Change-Id: Ieffb6d52c5f95d3257de8c47a039ccb0d45f0867 Reviewed-on: http://gerrit.cloudera.org:8080/4563 Reviewed-by: Jim Apple <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/5d9f5be6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/5d9f5be6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/5d9f5be6 Branch: refs/heads/master Commit: 5d9f5be6e398a4014856db8d1608d2089345c22a Parents: 3be113c Author: Jim Apple <[email protected]> Authored: Thu Sep 29 09:15:57 2016 -0700 Committer: Internal Jenkins <[email protected]> Committed: Wed Oct 5 22:55:36 2016 +0000 ---------------------------------------------------------------------- tests/run-custom-cluster-tests.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/5d9f5be6/tests/run-custom-cluster-tests.sh ---------------------------------------------------------------------- diff --git a/tests/run-custom-cluster-tests.sh b/tests/run-custom-cluster-tests.sh index 2b25cdc..adfc02a 100755 --- a/tests/run-custom-cluster-tests.sh +++ b/tests/run-custom-cluster-tests.sh @@ -27,18 +27,21 @@ trap 'echo Error in $0 at line $LINENO: $(cd "'$PWD'" && awk "NR == $LINENO" $0) # TODO: Combine with run-process-failure-tests.sh export HEAPCHECK= -AUX_CUSTOM_DIR="" -if [ -n ${IMPALA_AUX_TEST_HOME} ]; then - AUX_CUSTOM_DIR=${IMPALA_AUX_TEST_HOME}/tests/aux_custom_cluster_tests/ -fi - -export LOG_DIR=${IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR} -RESULTS_DIR=${IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR}/results -mkdir -p ${RESULTS_DIR} +export LOG_DIR="${IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR}" +RESULTS_DIR="${IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR}/results" +mkdir -p "${RESULTS_DIR}" # KERBEROS TODO We'll want to pass kerberos status in here. -cd ${IMPALA_HOME}/tests -. ${IMPALA_HOME}/bin/set-classpath.sh &> /dev/null -impala-py.test custom_cluster/ authorization/ ${AUX_CUSTOM_DIR} \ - --junitxml="${RESULTS_DIR}/TEST-impala-custom-cluster.xml" \ - --resultlog="${RESULTS_DIR}/TEST-impala-custom-cluster.log" "$@" +cd "${IMPALA_HOME}/tests" +. "${IMPALA_HOME}/bin/set-classpath.sh" &> /dev/null + +AUX_CUSTOM_DIR="${IMPALA_AUX_TEST_HOME}/tests/aux_custom_cluster_tests/" +ARGS=(custom_cluster/ authorization/) +if [[ -d "${AUX_CUSTOM_DIR}" ]] +then + ARGS+=("${AUX_CUSTOM_DIR}") +fi +ARGS+=('--junitxml="${RESULTS_DIR}/TEST-impala-custom-cluster.xml"') +ARGS+=('--resultlog="${RESULTS_DIR}/TEST-impala-custom-cluster.log"') +ARGS+=("$@") +impala-py.test "${ARGS[@]}"
