From d3b75da7a69a7207443a18c3e7d19c9b84bb0a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Thu, 24 Oct 2019 10:59:57 -0500 Subject: [PATCH 1/2] automated/linux/workload-automation: Add ability to skip upgrade pip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is causing problems because new pip versions (10.x) has a bug when dealing with distutil packages. [1] [1] https://github.com/pypa/pip/issues/5247 Change-Id: Ifdd9322dc507907b6347d26478a04a890dec6fed Signed-off-by: Aníbal Limón --- .../linux/workload-automation/workload-automation.sh | 11 ++++++++--- .../workload-automation/workload-automation.yaml | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/automated/linux/workload-automation/workload-automation.sh b/automated/linux/workload-automation/workload-automation.sh index 9de4e3dc9..e42e3f3e4 100755 --- a/automated/linux/workload-automation/workload-automation.sh +++ b/automated/linux/workload-automation/workload-automation.sh @@ -19,9 +19,10 @@ usage() { exit 1 } -while getopts ":s:t:r:T:c:a:o:R:D:d:" opt; do +while getopts ":s:u:t:r:T:c:a:o:R:D:d:" opt; do case "${opt}" in s) SKIP_INSTALL="${OPTARG}" ;; + u) SKIP_UPGRADE_PIP_SETUPTOOLS="${OPTARG}" ;; t) WA_TAG="${OPTARG}" ;; r) WA_TEMPLATES_REPO="${OPTARG}" ;; T) TEMPLATES_BRANCH="${OPTARG}" ;; @@ -51,8 +52,12 @@ if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then else PKGS="git wget zip tar xz-utils python python-yaml python-lxml python-setuptools python-numpy python-colorama python-pip sqlite3 time sysstat openssh-client openssh-server sshpass python-jinja2 curl" install_deps "${PKGS}" - pip install --upgrade --quiet pip && hash -r - pip install --upgrade --quiet setuptools + if [ "${SKIP_UPGRADE_PIP_SETUPTOOLS}" = "true" ] || [ "${SKIP_UPGRADE_PIP_SETUPTOOLS}" = "True" ]; then + info_msg "Upgrade PIP skipped" + else + pip install --upgrade --quiet pip && hash -r + pip install --upgrade --quiet setuptools + fi pip install --quiet pexpect pyserial pyyaml docutils python-dateutil info_msg "Installing devlib..." rm -rf devlib diff --git a/automated/linux/workload-automation/workload-automation.yaml b/automated/linux/workload-automation/workload-automation.yaml index 38cc8a12a..512d5ee2f 100644 --- a/automated/linux/workload-automation/workload-automation.yaml +++ b/automated/linux/workload-automation/workload-automation.yaml @@ -20,6 +20,7 @@ metadata: params: SKIP_INSTALL: "false" + SKIP_UPGRADE_PIP_SETUPTOOLS: "false" # Params for WA test run. WA_TAG: "master" WA_GIT_REPO: "https://github.com/ARM-software/workload-automation" @@ -50,7 +51,7 @@ run: - if [ -z "${OUTPUT}" ]; then OUTPUT="./output"; fi - echo ${OUTPUT} # Test run. - - ./workload-automation.sh -s "${SKIP_INSTALL}" -t "${WA_TAG}" -r "${WA_TEMPLATES_REPO}" -T "${TEMPLATES_BRANCH}" -c "${CONFIG}" -a "${AGENDA}" -R "${WA_GIT_REPO}" -d "${DEVLIB_REPO}" -D "${DEVLIB_TAG}" -o "${OUTPUT}" + - ./workload-automation.sh -s "${SKIP_INSTALL}" -u "${SKIP_UPGRADE_PIP_SETUPTOOLS}" -t "${WA_TAG}" -r "${WA_TEMPLATES_REPO}" -T "${TEMPLATES_BRANCH}" -c "${CONFIG}" -a "${AGENDA}" -R "${WA_GIT_REPO}" -d "${DEVLIB_REPO}" -D "${DEVLIB_TAG}" -o "${OUTPUT}" # Upload test output to artifactorial. - tar caf "wa-output.tar.xz" "${OUTPUT}" - ../../utils/upload-to-artifactorial.sh -a "wa-output.tar.xz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}" From 069c699b7f9bb4dbccf85aa269a725397b5deca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Thu, 24 Oct 2019 16:22:00 -0500 Subject: [PATCH 2/2] automated/linux: Shellcheck fix on workload-automation.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7f151bfe83927057db03f7509525746e2f765293 Signed-off-by: Aníbal Limón --- automated/linux/workload-automation/workload-automation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated/linux/workload-automation/workload-automation.sh b/automated/linux/workload-automation/workload-automation.sh index e42e3f3e4..42f00162d 100755 --- a/automated/linux/workload-automation/workload-automation.sh +++ b/automated/linux/workload-automation/workload-automation.sh @@ -40,7 +40,7 @@ done ! check_root && error_msg "Please run this test as root." cd "${TEST_DIR}" -if [ ! -z "${NEW_OUTPUT}" ]; then +if [ -n "${NEW_OUTPUT}" ]; then OUTPUT="${NEW_OUTPUT}" fi create_out_dir "${OUTPUT}"