From 9af9cecdc25dc15243e6ca54895620ab472780df Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Thu, 23 Aug 2018 17:27:18 -0400 Subject: [PATCH] Bugfix for run-tests.sh: run sdk/R install if docs are being built, they rely on it. Improvement for run-tests.sh: support multiple occurrences of the --only argument. No issue # Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- build/run-tests.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/build/run-tests.sh b/build/run-tests.sh index 7ca36f0f08..90e804a108 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -270,6 +270,7 @@ rotate_logfile() { declare -a failures declare -A skip +declare -A only declare -A testargs skip[apps/workbench_profile]=1 # nodemanager_integration tests are not reliable, see #12061. @@ -288,7 +289,7 @@ do skip[$1]=1; shift ;; --only) - only="$1"; skip[$1]=""; shift + only[$1]=1; skip[$1]=""; shift ;; --short) short=1 @@ -331,14 +332,19 @@ done # required when testing it. Skip that step if it is not needed. NEED_SDK_R=true -if [[ ! -z "${only}" && "${only}" != "sdk/R" ]]; then +if [[ ${#only[@]} -ne 0 ]] && + [[ -z "${only['sdk/R']}" && -z "${only['doc']}" ]]; then NEED_SDK_R=false fi -if [[ ${skip["sdk/R"]} = 1 ]]; then +if [[ ${skip["sdk/R"]} == 1 && ${skip["doc"]} == 1 ]]; then NEED_SDK_R=false fi +if [[ $NEED_SDK_R == false ]]; then + echo "R SDK not needed, it will not be installed." +fi + start_services() { echo 'Starting API, keepproxy, keep-web, ws, arv-git-httpd, and nginx ssl proxy...' if [[ ! -d "$WORKSPACE/services/api/log" ]]; then @@ -658,9 +664,9 @@ do_test() { ;; esac if [[ -z "${skip[$suite]}" && -z "${skip[$1]}" && \ - (-z "${only}" || "${only}" == "${suite}" || \ - "${only}" == "${1}") || - "${only}" == "${2}" ]]; then + (${#only[@]} -eq 0 || ${only[$suite]} = 1 || \ + ${only[$1]} = 1) || + ${only[$2]} = 1 ]]; then retry do_test_once ${@} else title "Skipping ${1} tests" -- 2.30.2