diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-09-19 14:45:02 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-10-10 07:56:32 +0000 |
commit | 031d069a9b33c7a44c87a5927b9f94f791d4bd8d (patch) | |
tree | 1fc48268d00538009fc85e464552ad9d601323c5 /tcwg-benchmark.sh | |
parent | b912798df902941c10068bd5cf10e8c9cdc90e8f (diff) |
tcwg-benchmark.sh: Prepare board for benchmarking
We have configuration steps that are needed to be run
on the host board (e.g., stopping/starting services) and inside
the container (e.g., starting/stopping perf workaround).
Container can't stop services on the main machine (unless we
proxy systemd interface somehow), and perf workaround is best
to be started using the version of perf that benchmarking uses.
Change-Id: I135060d043eb03946aef3d02e333df5902d1c8b7
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-x | tcwg-benchmark.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh index 3d911bf1..ae9208e0 100755 --- a/tcwg-benchmark.sh +++ b/tcwg-benchmark.sh @@ -26,6 +26,7 @@ BUILD_NUMBER="$BUILD_NUMBER" NODE_NAME="$NODE_NAME" WORKSPACE="$WORKSPACE" reboot="$reboot" +prepare_board="${prepare_board-true}" ignore_errors="$ignore_errors" clean_older_than="$clean_older_than" @@ -250,6 +251,17 @@ WORKSPACE=$HOME ./start-container-docker.sh --session-host "$boardname" --label trap "cleanup_all_containers" EXIT . ./run-container.sh +if $prepare_board; then + # FIXME: Implement more configurations and checks: + # disable swap + # set interrupt affinity + # check that there are no stray processes + # test that taskset works + remote_exec "$run_container_host:$run_container_port:-t -Snone" \ + sudo /usr/local/bin/benchmark.sh --jenkins-node $NODE_NAME \ + --action start_board --verbose +fi + ssh -t -Snone -p$run_container_port "$run_container_host" bmk-scripts/run.sh \ --bench "$(printf '%q' "$bench_list")" \ --config "${BUILD_NUMBER}-$run_profile" \ @@ -268,3 +280,12 @@ ssh -t -Snone -p$run_container_port "$run_container_host" bmk-scripts/run.sh \ --forceinstall "${forceinstall}" \ "${clean_older_than:+--clean_older_than "$clean_older_than"}" \ --verbose true + +if $prepare_board; then + remote_exec "$run_container_host:$run_container_port:-t -Snone" \ + sudo /usr/local/bin/benchmark.sh --action stop_board --verbose & + res=0 && wait $! || res=$? + if [ $res != 0 ]; then + echo "Warning: prepare-board.sh did not finish cleanly" + fi +fi |