diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-07-18 09:12:43 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2017-07-21 09:19:12 +0000 |
commit | e0c81471c028123859be5d3659a408e2ba9d1137 (patch) | |
tree | 3b08a079e2d53f7a0729f7ebcb1aca507dcb89c1 /tcwg-benchmark.sh | |
parent | 266f7da096eaa78f58db7aea18f300b52372ab8a (diff) |
tcwg-benchmark.sh: Reboot the board if requested.
To make sure benchmarking conditions are similar from one run to
another, reboot the board before starting, if requested.
Change-Id: I77e29db4b52347aac79f966956e172af638ea9f8
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-x | tcwg-benchmark.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh index 96d1bbf4..cea219ad 100755 --- a/tcwg-benchmark.sh +++ b/tcwg-benchmark.sh @@ -21,6 +21,7 @@ results_id="$results_id" BUILD_NUMBER="$BUILD_NUMBER" NODE_NAME="$NODE_NAME" WORKSPACE="$WORKSPACE" +reboot="$reboot" # Jenkins doesn't define variables when parameter value is empty (like cflags), # so enable "set -u" only after above binding of variables. @@ -107,6 +108,15 @@ fi rsync -az --delete bmk-scripts/ "$boardname:bmk-scripts/" +if $reboot; then + # Reboot the board + ssh $boardname sudo reboot + # Wait until the ssh server is ready + sleep 30 # Give time to the board to shutdown + ret=0 + wait_for_ssh_server $boardname 22 100 || ret=$? +fi + case "$testmode" in build|verify) input_size="test" ;; benchmark) input_size="ref" ;; |