Skip to content

Commit

Permalink
automated: linux: update bootrr definition
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mwasilew committed Jan 15, 2025
1 parent b52bb27 commit 65846d2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 11 deletions.
48 changes: 48 additions & 0 deletions automated/linux/bootrr/bootrr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2025 Qualcomm Inc.

# shellcheck disable=SC1091
. ../../lib/sh-test-lib
BOARD=""
REPOSITORY="https://github.com/linux-msm/bootrr"
SKIP_INSTALL="true"

usage() {
echo "Usage: $0 [-b <board>] [-r <bootrr repository url>] [-s <true|false>]" 1>&2
exit 1
}

while getopts "b:r:s:" o; do
case "$o" in
b) BOARD="${OPTARG}" ;;
r) REPOSITORY="${OPTARG}" ;;
s) SKIP_INSTALL="${OPTARG}" ;;
*) usage ;;
esac
done

install() {
install_deps git "${SKIP_INSTALL}"
git clone "${REPOSITORY}" bootrr
cd bootrr || error_msg "bootrr cloning failed"
make DESTDIR=/ install
}

! check_root && error_msg "This script must be run as root"

if [ "${SKIP_INSTALL}" = "false" ] || [ "${SKIP_INSTALL}" = "False" ] || [ "${SKIP_INSTALL}" = "FALSE" ]; then
install
fi

if [ -z "${BOARD}" ]; then
# bootrr tests are executed based on DTB
bootrr
else
# run tests for board that might not be compatible
BOOTRR_DIR="/usr/libexec/bootrr"
PATH="${BOOTRR_DIR}/helpers:${PATH}"
if [ -x "${BOOTRR_DIR}/boards/${BOARD}" ]; then
${BOOTRR_DIR}/boards/"${BOARD}"
fi
fi
21 changes: 10 additions & 11 deletions automated/linux/bootrr/bootrr.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
metadata:
format: Lava-Test Test Definition 1.0
name: bootrr
description: "Run bootrr https://github.com/andersson/bootrr"
description: "Run bootrr https://github.com/linux-msm/bootrr"
maintainer:
- milosz.wasilewski@linaro.org
- milosz.wasilewski@oss.qualcomm.com
- [email protected]
os:
- debian
Expand All @@ -17,17 +17,16 @@ metadata:
- apq8016-sbc
- dragonboard-410c
- dragonboard-820c
- qcs6490-rb3gen2

params:
# Refer to https://github.com/andersson/bootrr/tree/master/boards for boards supported.
BOARD: "arrow,apq8096-db820c"
SKIP_INSTALL: false
# Refer to https://github.com/linux-msm/bootrr/tree/master/boards for boards supported.
BOARD: ""
REPOSITORY: "https://github.com/linux-msm/bootrr"
SKIP_INSTALL: true

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

0 comments on commit 65846d2

Please sign in to comment.