summaryrefslogtreecommitdiff
path: root/tcwg-benchmark.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-28 18:02:24 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-28 18:02:24 +0000
commit1f8fbbae5ef71561893900780e4767e6081e155a (patch)
tree3ef5b83d6c1cabce4bbadadf48932c28eb20a7f5 /tcwg-benchmark.sh
parentb94d1eccc7ce401605222a17767c1eacabea7892 (diff)
tcwg-benchmark.sh: Move handling of "builder" parameter
Change-Id: I5f5e2b31146785d2b1c9d57c76ddece4a1f871f9
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-xtcwg-benchmark.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh
index 37859848..9c92011f 100755
--- a/tcwg-benchmark.sh
+++ b/tcwg-benchmark.sh
@@ -53,16 +53,9 @@ declare -g \
# Make shellcheck happy and workaround Jenkins not defining variables
# for empty arguments.
bench_container_tag="${bench_container_tag-bionic}"
-build_container_tag="${build_container_tag-bionic}"
toolchain_type="${toolchain_type-auto}"
prepare_board="${prepare_board-true}"
-if echo "$builder" | grep -q ".*-[0-9]\+"; then
- docker_host_opt="--arch amd64 --node $builder"
-else
- docker_host_opt="--label $builder"
-fi
-
# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
@@ -99,6 +92,15 @@ case "$toolchain_url" in
fi
;;
*)
+ build_container_tag="${builder#*:}"
+ builder="${builder%:*}"
+ if echo "$builder" | grep -q ".*-[0-9]\+"; then
+ # Builder is a specific node
+ docker_host_opt="--arch amd64 --node $builder"
+ else
+ docker_host_opt="--label $builder"
+ fi
+
# Make sure to cleanup build container if something goes
# wrong when preparing the test environment
trap "cleanup_all_containers" EXIT