diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-03-23 04:46:09 +0000 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-04-09 12:16:05 +0100 |
commit | 52179ae1b2f1777b038e60e31432010743619f6a (patch) | |
tree | 83ac94428819e87c17871aca1ee616634a708adb | |
parent | 59920d38a63b57f70cf2c56f042d95ce9faf02a6 (diff) |
workload-automation: allow forked WA repository
This patch adds option to use WA from different repository than default
ARM's sources.
Change-Id: Ic6508f81a7fe5433c9b500f675e517ea489f1843
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
4 files changed, 14 insertions, 8 deletions
diff --git a/automated/android/workload-automation/workload-automation.sh b/automated/android/workload-automation/workload-automation.sh index f1992c7..be06326 100755 --- a/automated/android/workload-automation/workload-automation.sh +++ b/automated/android/workload-automation/workload-automation.sh @@ -8,6 +8,7 @@ ANDROID_SERIAL="" BOOT_TIMEOUT="300" PROBE="" WA_TAG="master" +WA_GIT_REPO="https://github.com/ARM-software/workload-automation" WA_TEMPLATES_REPO="https://git.linaro.org/qa/wa2-lava.git" TEMPLATES_BRANCH="wa-templates" CONFIG="config/generic-android.py" @@ -16,11 +17,11 @@ BUILD_TOOLS_URL="http://testdata.validation.linaro.org/apks/workload-automation/ WA_HOME_URL="http://testdata.validation.linaro.org/apks/workload-automation/workload_automation_home.tar.gz" usage() { - echo "Usage: $0 [-s <true|false>] [-S <android_serial>] [-t <boot_timeout>] [-T <wa_tag>] [-r <wa_templates_repo>] [-g <templates_branch>] [-c <config>] [-a <agenda>] [-b <build_tools_url>] [-w <wa_home_url>] [-p <aep_path>] [-o <output_dir>]" 1>&2 + echo "Usage: $0 [-s <true|false>] [-S <android_serial>] [-t <boot_timeout>] [-T <wa_tag>] [-r <wa_templates_repo>] [-g <templates_branch>] [-c <config>] [-a <agenda>] [-b <build_tools_url>] [-w <wa_home_url>] [-p <aep_path>] [-o <output_dir>] [-R <wa_git_repository>]" 1>&2 exit 1 } -while getopts ":s:S:t:T:r:g:c:a:b:w:p:o:" opt; do +while getopts ":s:S:t:T:r:g:c:a:b:w:p:o:R:" opt; do case "${opt}" in s) SKIP_INSTALL="${OPTARG}" ;; S) ANDROID_SERIAL="${OPTARG}" ;; @@ -32,6 +33,7 @@ while getopts ":s:S:t:T:r:g:c:a:b:w:p:o:" opt; do a) AGENDA="${OPTARG}" ;; b) BUILD_TOOLS_URL="${OPTARG}" ;; w) WA_HOME_URL="${OPTARG}" ;; + R) WA_GIT_REPO="${OPTARG}" ;; p) PROBE="${OPTARG}" ;; o) NEW_OUTPUT="${OPTARG}" ;; *) usage ;; @@ -64,7 +66,7 @@ else pip install --quiet pexpect pyserial pyyaml docutils python-dateutil info_msg "Installing workload-automation..." rm -rf workload-automation - git clone https://github.com/ARM-software/workload-automation + git clone "${WA_GIT_REPO}" workload-automation ( cd workload-automation git checkout "${WA_TAG}" diff --git a/automated/android/workload-automation/workload-automation.yaml b/automated/android/workload-automation/workload-automation.yaml index e5dc2b9..edf6a91 100644 --- a/automated/android/workload-automation/workload-automation.yaml +++ b/automated/android/workload-automation/workload-automation.yaml @@ -23,6 +23,7 @@ params: ANDROID_SERIAL: "" # Params for WA test run. WA_TAG: "master" + WA_GIT_REPO: "https://github.com/ARM-software/workload-automation" BUILD_TOOLS_URL: "http://testdata.validation.linaro.org/apks/workload-automation/build-tools.tar.gz" WA_HOME_URL: "http://testdata.validation.linaro.org/apks/workload-automation/workload_automation_home.tar.gz" WA_TEMPLATES_REPO: "https://git.linaro.org/qa/wa2-lava.git" @@ -50,7 +51,7 @@ run: - if [ -z "${OUTPUT}" ]; then OUTPUT="./output"; fi - echo ${OUTPUT} # Test run. - - ./workload-automation.sh -s "${SKIP_INSTALL}" -t "${BOOT_TIMEOUT}" -S "${ANDROID_SERIAL}" -T "${WA_TAG}" -r "${WA_TEMPLATES_REPO}" -g "${TEMPLATES_BRANCH}" -c "${CONFIG}" -a "${AGENDA}" -b "${BUILD_TOOLS_URL}" -w "${WA_HOME_URL}" -p "${PROBE}" -o "${OUTPUT}" + - ./workload-automation.sh -s "${SKIP_INSTALL}" -t "${BOOT_TIMEOUT}" -S "${ANDROID_SERIAL}" -T "${WA_TAG}" -r "${WA_TEMPLATES_REPO}" -g "${TEMPLATES_BRANCH}" -c "${CONFIG}" -a "${AGENDA}" -b "${BUILD_TOOLS_URL}" -w "${WA_HOME_URL}" -p "${PROBE}" -R "${WA_GIT_REPO}" -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}" diff --git a/automated/linux/workload-automation/workload-automation.sh b/automated/linux/workload-automation/workload-automation.sh index 065f9d6..2662a5d 100755 --- a/automated/linux/workload-automation/workload-automation.sh +++ b/automated/linux/workload-automation/workload-automation.sh @@ -6,17 +6,18 @@ OUTPUT="${TEST_DIR}/output" SKIP_INSTALL="false" WA_TAG="master" +WA_GIT_REPO="https://github.com/ARM-software/workload-automation" WA_TEMPLATES_REPO="https://git.linaro.org/qa/wa2-lava.git" TEMPLATES_BRANCH="wa-templates" CONFIG="config/generic-linux-localhost.py" AGENDA="agenda/linux-dhrystone.yaml" usage() { - echo "Usage: $0 [-s <true|false>] [-t <wa_tag>] [-r <wa_templates_repo>] [-T <templates_branch>] [-c <config>] [-a <agenda>] [-o <output_dir> ]" 1>&2 + echo "Usage: $0 [-s <true|false>] [-t <wa_tag>] [-r <wa_templates_repo>] [-T <templates_branch>] [-c <config>] [-a <agenda>] [-o <output_dir> ] [-R <wa_git_repository>]" 1>&2 exit 1 } -while getopts ":s:t:r:T:c:a:o:" opt; do +while getopts ":s:t:r:T:c:a:o:R:" opt; do case "${opt}" in s) SKIP_INSTALL="${OPTARG}" ;; t) WA_TAG="${OPTARG}" ;; @@ -24,6 +25,7 @@ while getopts ":s:t:r:T:c:a:o:" opt; do T) TEMPLATES_BRANCH="${OPTARG}" ;; c) CONFIG="${OPTARG}" ;; a) AGENDA="${OPTARG}" ;; + R) WA_GIT_REPO="${OPTARG}" ;; o) NEW_OUTPUT="${OPTARG}" ;; *) usage ;; esac @@ -50,7 +52,7 @@ else pip install --quiet pexpect pyserial pyyaml docutils python-dateutil info_msg "Installing workload-automation..." rm -rf workload-automation - git clone https://github.com/ARM-software/workload-automation + git clone "${WA_GIT_REPO}" workload-automation ( cd workload-automation git checkout "${WA_TAG}" diff --git a/automated/linux/workload-automation/workload-automation.yaml b/automated/linux/workload-automation/workload-automation.yaml index 57818bf..38895eb 100644 --- a/automated/linux/workload-automation/workload-automation.yaml +++ b/automated/linux/workload-automation/workload-automation.yaml @@ -22,6 +22,7 @@ params: SKIP_INSTALL: "false" # Params for WA test run. WA_TAG: "master" + WA_GIT_REPO: "https://github.com/ARM-software/workload-automation" WA_TEMPLATES_REPO: "https://git.linaro.org/qa/wa2-lava.git" TEMPLATES_BRANCH: "wa-templates" CONFIG: "config/generic-linux-localhost.py" @@ -46,7 +47,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}" -o "${OUTPUT}" + - ./workload-automation.sh -s "${SKIP_INSTALL}" -t "${WA_TAG}" -r "${WA_TEMPLATES_REPO}" -T "${TEMPLATES_BRANCH}" -c "${CONFIG}" -a "${AGENDA}" -R "${WA_GIT_REPO}" -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}" |