summaryrefslogtreecommitdiff
path: root/56-prepare-soraka-CTS.sh
blob: 20f880e063704827adb2837c37ae95e3bc938fca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

# SPDX-License-Identifier: GPL-2.0-or-later
#
# CTS Tree builder
#
# This is a highly specific test to compile CTS in a pre-prepared CrOS-SDK with
# a pre-installed soraka-libcamera target.

CROS=/home/kbingham/iob/libcamera/chromeos
CROS_CTS=$CROS/CTS/libcamera-cts
CROS_CTS_RESULTS=$CROS_CTS/results/
CROS_LIBCAMERA=$CROS/src/third_party/libcamera

source ./common.sh

if [ ! -d $CROS_CTS ] ;
then
	echo " [CTS] This test is highly customised to run on Kieran's Build Server"
	echo " [CTS] Feel free to adapt if possible but otherwise this will skip..."
	exit 0
fi

echo "Preparing Soraka for CTS" > $logfile

## Reboot the soraka

ssh soraka reboot
sleep 1

## Wait for it to come back alive and respond to pings
until nc -zw 1 -v soraka 22; do
	sleep 5
done

## Log in
login_soraka() {
	echo "Preparing Soraka for CTS..."

	( sudo $CROS/chromite/bin/cros_sdk tast run soraka arc.Boot ) 2>&1
	pass_fail $? "Logging into Soraka"
}

login_soraka >> $logfile

echo "Soraka logged in and prepared for CTS."