diff options
author | David Spickett <david.spickett@linaro.org> | 2020-05-22 10:40:52 +0100 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2020-05-22 10:03:47 +0000 |
commit | b5a367d78edd5c46af667b39afedd61bf48a2b23 (patch) | |
tree | 3b1deb0b10907ee1ccb39f26d67c2a3d454b7c93 /tcwg_bmk-build.sh | |
parent | 6f022a7416870326951b256ba67b324390d3df37 (diff) |
twcg_bmk-build.sh: Correct scope of build ret
The function runs in subshell so we were trying
to return build_ret after that subshell had finished.
Change-Id: I7baf15077451ca563dce09facf0131ceb38c8bc1
Diffstat (limited to 'tcwg_bmk-build.sh')
-rwxr-xr-x | tcwg_bmk-build.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index b743555c..0f0bff32 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -239,6 +239,7 @@ benchmark () [ "$build_num" -gt "0" ] local build_status + local build_ret while true; do (remote_exec "ci.linaro.org:2222::-l $USER@linaro.org" \ console tcwg-benchmark-$hw -n 1 -f $build_num || true) \ @@ -248,7 +249,6 @@ benchmark () # to check whether benchmarking has finished, and, if not, continue # to watch its output. build_status=$(tail -n 1 $run_step_artifacts/benchmark.log) - local build_ret case "$build_status" in "Finished: SUCCESS") build_ret=0 @@ -258,6 +258,9 @@ benchmark () build_ret=1 break ;; + *) + assert_wth_msg "Unknown build status \"$build_status\"" false + ;; esac # Sleep a little to avoid flooding ci.linaro.org on transient ssh @@ -267,9 +270,8 @@ benchmark () echo "$results_id" | sed -e "s/@build_num@/$build_num/g" \ > "$results_id_file" - ) - return $build_ret + ) } # Compare results between $1 and $2 and generate results-compare.csv |