Skip to content

Commit 649fbe3

Browse files
mwasilewroxell
authored andcommitted
automated: linux: update bootrr definition
bootrr official upstream repository moved to https://github.com/linux-msm/bootrr. On top of that bootrr now executes tests based on the DTB. It is still possible to overwrite the detected DTB but it's not a recommended way of running the test. On the systems without package manager the bootrr package should be preinstalled before running the test. Signed-off-by: Milosz Wasilewski <milosz.wasilewski@oss.qualcomm.com>
1 parent b52bb27 commit 649fbe3

File tree

2 files changed

+58
-11
lines changed

2 files changed

+58
-11
lines changed

automated/linux/bootrr/bootrr.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/sh
2+
# SPDX-License-Identifier: GPL-2.0-only
3+
# Copyright (C) 2025 Qualcomm Inc.
4+
5+
# shellcheck disable=SC1091
6+
. ../../lib/sh-test-lib
7+
BOARD=""
8+
REPOSITORY="https://github.com/linux-msm/bootrr"
9+
SKIP_INSTALL="true"
10+
11+
usage() {
12+
echo "Usage: $0 [-b <board>] [-r <bootrr repository url>] [-s <true|false>]" 1>&2
13+
exit 1
14+
}
15+
16+
while getopts "b:r:s:" o; do
17+
case "$o" in
18+
b) BOARD="${OPTARG}" ;;
19+
r) REPOSITORY="${OPTARG}" ;;
20+
s) SKIP_INSTALL="${OPTARG}" ;;
21+
*) usage ;;
22+
esac
23+
done
24+
25+
install() {
26+
install_deps git "${SKIP_INSTALL}"
27+
git clone "${REPOSITORY}" bootrr
28+
cd bootrr || error_msg "bootrr cloning failed"
29+
make DESTDIR=/ install
30+
}
31+
32+
! check_root && error_msg "This script must be run as root"
33+
34+
if [ "${SKIP_INSTALL}" = "false" ] || [ "${SKIP_INSTALL}" = "False" ] || [ "${SKIP_INSTALL}" = "FALSE" ]; then
35+
install
36+
fi
37+
38+
if [ -z "${BOARD}" ]; then
39+
# bootrr tests are executed based on DTB
40+
bootrr
41+
else
42+
# run tests for board that might not be compatible
43+
BOOTRR_DIR="/usr/libexec/bootrr"
44+
PATH="${BOOTRR_DIR}/helpers:${PATH}"
45+
if [ -x "${BOOTRR_DIR}/boards/${BOARD}" ]; then
46+
${BOOTRR_DIR}/boards/"${BOARD}"
47+
fi
48+
fi

automated/linux/bootrr/bootrr.yaml

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
metadata:
22
format: Lava-Test Test Definition 1.0
33
name: bootrr
4-
description: "Run bootrr https://github.com/andersson/bootrr"
4+
description: "Run bootrr https://github.com/linux-msm/bootrr"
55
maintainer:
6-
- milosz.wasilewski@linaro.org
6+
- milosz.wasilewski@oss.qualcomm.com
77
- chase.qi@linaro.org
88
os:
99
- debian
@@ -17,17 +17,16 @@ metadata:
1717
- apq8016-sbc
1818
- dragonboard-410c
1919
- dragonboard-820c
20+
- qcs6490-rb3gen2
2021

2122
params:
22-
# Refer to https://github.com/andersson/bootrr/tree/master/boards for boards supported.
23-
BOARD: "arrow,apq8096-db820c"
24-
SKIP_INSTALL: false
23+
# Refer to https://github.com/linux-msm/bootrr/tree/master/boards for boards supported.
24+
BOARD: ""
25+
REPOSITORY: "https://github.com/linux-msm/bootrr"
26+
SKIP_INSTALL: true
2527

2628
run:
2729
steps:
28-
- . ./automated/lib/sh-test-lib
29-
- install_deps git "${SKIP_INSTALL}"
30-
- git clone https://github.com/andersson/bootrr
31-
- cd bootrr
32-
- export PATH=$PWD/helpers:$PATH
33-
- ./boards/${BOARD}
30+
- cd automated/linux/bootrr
31+
# bootrr produces LAVA friendly output
32+
- ./bootrr.sh -r "${REPOSITORY}" -s "S{SKIP_INSTALL}" -b "${BOARD}"

0 commit comments

Comments
 (0)