diff --git a/ci/flaky_test/run_process_xml_mac.sh b/ci/flaky_test/run_process_xml_mac.sh index 9dad6b7ea7fdb..8e7f0a3edbc86 100755 --- a/ci/flaky_test/run_process_xml_mac.sh +++ b/ci/flaky_test/run_process_xml_mac.sh @@ -1,4 +1,6 @@ #!/bin/bash -pip3 install slackclient -./ci/flaky_test/process_xml.py +# shellcheck source=tools/shell_utils.sh +. "${ENVOY_SRCDIR}"/tools/shell_utils.sh + +python_venv process_xml "$1" diff --git a/ci/mac_ci_setup.sh b/ci/mac_ci_setup.sh index 9ac12acf5e805..d89c9ea646960 100755 --- a/ci/mac_ci_setup.sh +++ b/ci/mac_ci_setup.sh @@ -64,5 +64,3 @@ if ! brew link --overwrite bazelisk; then fi bazel version - -pip3 install slackclient diff --git a/tools/code_format/check_shellcheck_format.sh b/tools/code_format/check_shellcheck_format.sh index 3edab648625f8..2e83d9aafd7b3 100755 --- a/tools/code_format/check_shellcheck_format.sh +++ b/tools/code_format/check_shellcheck_format.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -EXCLUDED_SHELLFILES=${EXCLUDED_SHELLFILES:-"^.github|.rst$|.md$"} +EXCLUDED_SHELLFILES=${EXCLUDED_SHELLFILES:-"^.github|.rst$|.md$|shell_utils.sh"} find_shell_files () { diff --git a/tools/shell_utils.sh b/tools/shell_utils.sh index 470b9c6fc0786..a52f92e13bbca 100644 --- a/tools/shell_utils.sh +++ b/tools/shell_utils.sh @@ -1,11 +1,11 @@ #!/bin/bash - +set -x source_venv() { VENV_DIR=$1 if [[ "${VIRTUAL_ENV}" == "" ]]; then if [[ ! -d "${VENV_DIR}"/venv ]]; then - virtualenv "${VENV_DIR}"/venv --python=python3 + virtualenv "${VENV_DIR}"/venv --python=python3.8 fi # shellcheck disable=SC1090 source "${VENV_DIR}/venv/bin/activate" @@ -22,8 +22,11 @@ python_venv() { VENV_DIR="${BUILD_DIR}/${PY_NAME}" source_venv "${VENV_DIR}" + which pip # debug, temporary pip install -r "${SCRIPT_DIR}"/requirements.txt + pip list # debug, temporary shift + which python3 # debug, temporary python3 "${SCRIPT_DIR}/${PY_NAME}.py" "$*" }