aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-09-12 10:17:23 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2017-09-12 10:18:51 +0000
commitbe747fd80675c23bd274ffb913334000280438fa (patch)
treefceccbeae3b935063612e0953bce75556d97d600
parenta375f89de140820b826f1335b35de7bfdd22a9e4 (diff)
run.sh: Fix wait condition when collecting results.
In case a cpu didn't run any benchmark, don't wait for non-existing child processes. Otherwise, the expansion of ${pids[$cpu]} is empty, and we wait for all the children, leading to an error in the next iteration when ${pids[$cpus]} expands to an actual pid, which has already completed. Change-Id: Ic70d0e3ddc39f7dcecf70dbdaaf1b88ffe8e3788
-rwxr-xr-xrun.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/run.sh b/run.sh
index d8797ed..2b95c2c 100755
--- a/run.sh
+++ b/run.sh
@@ -245,6 +245,8 @@ done
echo "Note: Waiting for runs to finish"
for cpu in ${cpus[@]}
do
+ # If nothing ran on this cpu, continue
+ [ x"${pids[${cpu}]}" = x ] && continue
result=0; wait ${pids[$cpu]} || result=$?
if [ $result != 0 ]; then
status=1