mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-24 02:34:17 +08:00
ci: bare-metal: power down device after tests
Helps to save electricity. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4754>
This commit is contained in:
parent
b4cc116339
commit
7d476a1360
@ -15,6 +15,12 @@ if [ -z "$BM_POWERUP" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_POWERDOWN" ]; then
|
||||
echo "Must set BM_POWERDOWN in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This is a shell script that should power off the device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$BM_FASTBOOT_SERIAL" ]; then
|
||||
echo "Must set BM_FASTBOOT_SERIAL in your gitlab-runner config.toml [[runners]] environment"
|
||||
echo "This must be the a stable-across-resets fastboot serial number."
|
||||
@ -90,6 +96,9 @@ fastboot boot -s $BM_FASTBOOT_SERIAL artifacts/fastboot.img
|
||||
# Wait for the device to complete the deqp run
|
||||
$BM/expect-output.sh artifacts/serial-output.txt "DEQP RESULT"
|
||||
|
||||
# power down the device
|
||||
PATH=$BM:$PATH $BM_POWERDOWN
|
||||
|
||||
set +e
|
||||
if grep -q "DEQP RESULT: pass" artifacts/serial-output.txt; then
|
||||
exit 0
|
||||
|
10
.gitlab-ci/bare-metal/google-power-down.sh
Executable file
10
.gitlab-ci/bare-metal/google-power-down.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
relay=$1
|
||||
|
||||
if [ -z "$relay" ]; then
|
||||
echo "Must supply a relay arg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CI_PROJECT_DIR/.gitlab-ci/bare-metal/google-power-relay.py off $relay
|
Loading…
Reference in New Issue
Block a user