Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#!/system/bin/sh
# shellcheck disable=SC2039
# shellcheck shell=ksh
# shellcheck disable=SC2086
# shellcheck disable=SC2181
# shellcheck disable=SC2155
# shellcheck disable=SC2166
# shellcheck disable=SC2320
# shellcheck disable=SC3006
# shellcheck disable=SC3010
# shellcheck disable=SC3018
# shellcheck disable=SC3037
# shellcheck disable=SC3057
# shellcheck disable=SC3060
#############################################################################
# Copyright (c) 2014 Linaro
# Copyright (c) 2025 Qualcomm Inc
Expand Down
4 changes: 2 additions & 2 deletions automated/lib/sh-test-lib
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ install_deps() {
;;
fedora)
# shellcheck disable=SC2086
dnf -e 0 -y install ${pkgs}
dnf -y install ${pkgs}
;;
*)
warn_msg "Unsupported distro: ${dist}! Package installation skipped."
Expand Down Expand Up @@ -404,7 +404,7 @@ dist_info() {
dist_name
case "${dist}" in
debian|ubuntu) install_deps "lsb-release" ;;
centos|fedora) install_deps "redhat-lsb-core" ;;
centos|fedora) install_deps "/usr/bin/lsb_release" ;;
*) warn_msg "Unsupported distro: dist_info skipped"
esac
fi
Expand Down
2 changes: 1 addition & 1 deletion automated/linux/smoke/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ install() {
# shellcheck disable=SC2154
case "${dist}" in
debian|ubuntu) install_deps "lsb-release procps iproute2" "${SKIP_INSTALL}";;
fedora|centos) install_deps "redhat-lsb-core procps iproute" "${SKIP_INSTALL}";;
fedora|centos) install_deps "/usr/bin/lsb_release procps iproute" "${SKIP_INSTALL}";;
unknown) warn_msg "Unsupported distro: package install skipped" ;;
esac
}
Expand Down
14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ skip package install:

Run a set of tests defined in agenda file:

test-runner -p ./plans/linux-example.yaml
test-runner -p ./plans/linux-test-plan-example.yaml

Apply test plan overlay to skip, amend or add tests:

test-runner -p ./plans/linux-example.yaml -O test-plan-overlay-example.yaml
test-runner -p ./plans/linux-test-plan-example.yaml -O ./plans/test-plan-overlay-example.yaml

## Collecting result

Expand Down Expand Up @@ -142,10 +142,10 @@ recent commit:

To develop locally, there are Dockerfiles in test/ that can be used to simulate
target environments. The easiest way to use is to run `test.sh
[debian|centos]`. test.sh will run validate.py, and then build the Docker
environment specified, run plans/linux-example.yaml, and then drop into a bash
shell inside the container so that things like /root/output can be inspected.
It is not (yet) a pass/fail test; merely a development helper and validation
environment.
[debian|fedora]`. test.sh will run validate.py, and then build the Docker
environment specified, run plans/linux-test-plan-example.yaml, and then drop
into a bash shell inside the container so that things like /root/output can be
inspected. It is not (yet) a pass/fail test; merely a development helper and
validation environment.

For full documentation visit [test-definitions.readthedocs.io](https://test-definitions.readthedocs.io).
4 changes: 2 additions & 2 deletions docs/test-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ authentication. This means that:

Run a set of tests defined in agenda file:

test-runner -p ./plans/linux-example.yaml
test-runner -p ./plans/linux-test-plan-example.yaml

Apply test plan overlay to skip, amend or add tests:

test-runner -p ./plans/linux-example.yaml -O test-plan-overlay-example.yaml
test-runner -p ./plans/linux-test-plan-example.yaml -O ./plans/test-plan-overlay-example.yaml


## Running manual tests
Expand Down
2 changes: 1 addition & 1 deletion docs/test-writing-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Example 2::
dist_name
case "${dist}" in
debian|ubuntu) install_deps "lsb-release" "${SKIP_INSTALL}" ;;
fedora|centos) install_deps "redhat-lsb-core" "${SKIP_INSTALL}" ;;
fedora|centos) install_deps "/usr/bin/lsb_release" "${SKIP_INSTALL}" ;;
*) warn_msg "Unsupported distro: ${dist}! Package installation skipped." ;;
esac

Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -e

if [ -z "$1" ] || [ ! -e "test/Dockerfile.${1}" ]; then
echo "USAGE: $0 [debian|centos]"
echo "USAGE: $0 [debian|fedora]"
exit 1
fi

python3 validate.py -p E501 W503 -s SC1091 SC2230
./sanity-check.sh
docker build -f test/Dockerfile."${1}" -t erp-"${1}" . && docker run --rm -it -v "$(pwd)":/work erp-"${1}"

13 changes: 0 additions & 13 deletions test/Dockerfile.centos

This file was deleted.

2 changes: 1 addition & 1 deletion test/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ COPY . /work
WORKDIR /work
RUN pip install -r automated/utils/requirements.txt

CMD . ./automated/bin/setenv.sh && test-runner -p plans/linux-example.yaml && bash
CMD . ./automated/bin/setenv.sh && test-runner -p plans/linux-test-plan-example.yaml && bash

9 changes: 9 additions & 0 deletions test/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM fedora:44

RUN dnf -y install vim python3 python3-pip git

COPY . /work
WORKDIR /work
RUN pip3 install -r automated/utils/requirements.txt

CMD . ./automated/bin/setenv.sh && test-runner -p plans/linux-test-plan-example.yaml && bash
Loading