From ebe8198d944368a4007095bcbb16cf505b33fa51 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Mon, 21 Jun 2021 07:36:33 +0000 Subject: tcwg-benchmark.sh: Return infrastructure error on problems with HW Change-Id: Ic621c2a683c56267855bdec9706a87c280964b52 --- tcwg-benchmark.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh index c8121337..37859848 100755 --- a/tcwg-benchmark.sh +++ b/tcwg-benchmark.sh @@ -241,7 +241,6 @@ hw_tag="${results_id%%/*}" case "$hw_tag:$boardname:$image_arch" in sq_32:*-sq-*:armhf) ;; sq_64:*-sq-*:arm64) ;; - tx1_32:*-tx1-*:armhf) ;; tk1_32:*-tk1-*:armhf) ;; tx1_64:*-tx1-*:arm64) ;; tx1_32:*-tx1-*:armhf) ;; @@ -327,12 +326,25 @@ if $prepare_board; then remote_exec "$boardname:::-t -Snone" \ sudo /usr/local/bin/benchmark.sh --hw_tag "$hw_tag" \ --action start_board --verbose \ - --image "linaro/ci-$image_arch-tcwg-build-ubuntu:$bench_container_tag" + --image "linaro/ci-$image_arch-tcwg-build-ubuntu:$bench_container_tag" & + + res=0 && wait $! || res=$? + if [ $res != 0 ]; then + echo "ERROR: Could not prepare board for benchmarking" + exit $EXTERNAL_FAIL + fi fi # Start a container to run the benchmarks in. # We install SPEC in /home/tcwg-benchmark, so bind-mount it as $WORKSPACE. -WORKSPACE=$HOME $scripts/start-container-docker.sh --session-host "$boardname" --arch "$image_arch" --distro "$bench_container_tag" --task bench --docker_opts "--privileged" --prefix run_ > run-container.sh +WORKSPACE=$HOME $scripts/start-container-docker.sh --session-host "$boardname" --arch "$image_arch" --distro "$bench_container_tag" --task bench --docker_opts "--privileged" --prefix run_ > run-container.sh & + +res=0 && wait $! || res=$? +if [ $res != 0 ]; then + echo "ERROR: Could not start benchmarking container" + exit $EXTERNAL_FAIL +fi + trap "cleanup_all_containers" EXIT . ./run-container.sh -- cgit v1.2.3