diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2021-03-02 20:41:12 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2021-03-02 20:41:12 +0000 |
commit | 1360b58f6bed64d011ec9b068c02cf2b5ad6c37a (patch) | |
tree | 6601cb4f28339efb6f03fa8d5cf9840690ac4825 /tcwg-benchmark-bare.sh | |
parent | a81976c653cf9262a9fa040d2e6f319a3b06e173 (diff) |
tcwg-benchmark-bare.sh: Create the "run" container before needing it
In case we need to copy the toolchain to the "run" container,
we need to start it early.
Change-Id: Iafcea3ecbb3d2d080f5a18d80f63205b39abc490
Diffstat (limited to 'tcwg-benchmark-bare.sh')
-rwxr-xr-x | tcwg-benchmark-bare.sh | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tcwg-benchmark-bare.sh b/tcwg-benchmark-bare.sh index 17e88961..dc6fea3c 100755 --- a/tcwg-benchmark-bare.sh +++ b/tcwg-benchmark-bare.sh @@ -25,7 +25,24 @@ set -u . jenkins-helpers.sh -# If $toolchain_url is of ssh:// type, don't create a remote build +# Start a container to run the benchmarks in. +# The board is connected to the slave via USB, the container needs +# special rights to access it. + +# tcwg-benchmark user already exists, re-creating it causes an error. +newuser= +[ "x$USER" != "xtcwg-benchmark" ] && newuser="--newuser $USER" + +./start-container-docker.sh \ + $newuser \ + --distro "$bench_container_tag" \ + --task bench \ + --docker_opts "--privileged -v /dev/bus/usb:/dev/bus/usb" \ + --prefix run_ > run-container.sh +trap "cleanup_all_containers" EXIT +. ./run-container.sh + +# If $toolchain_url is of ssh:// type, don't use a remote build # container, just use the ssh command as provided. build_container_host= build_container_port= @@ -172,23 +189,6 @@ case "$hw_tag" in ;; esac -# Start a container to run the benchmarks in. -# The board is connected to the slave via USB, the container needs -# special rights to access it. - -# tcwg-benchmark user already exists, re-creating it causes an error. -newuser= -[ "x$USER" != "xtcwg-benchmark" ] && newuser="--newuser $USER" - -./start-container-docker.sh \ - $newuser \ - --distro "$bench_container_tag" \ - --task bench \ - --docker_opts "--privileged -v /dev/bus/usb:/dev/bus/usb" \ - --prefix run_ > run-container.sh -trap "cleanup_all_containers" EXIT -. ./run-container.sh - # vars are from run-container.sh sourced above # shellcheck disable=SC2154 case "$bench_list" in |