summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
Diffstat (limited to 'automated/linux')
-rwxr-xr-xautomated/linux/smoke/smoke.sh16
-rw-r--r--automated/linux/smoke/smoke.yaml8
2 files changed, 18 insertions, 6 deletions
diff --git a/automated/linux/smoke/smoke.sh b/automated/linux/smoke/smoke.sh
index 4482595..32f71b0 100755
--- a/automated/linux/smoke/smoke.sh
+++ b/automated/linux/smoke/smoke.sh
@@ -1,32 +1,35 @@
#!/bin/sh
+# shellcheck disable=SC1091
. ../../lib/sh-test-lib
OUTPUT="$(pwd)/output"
RESULT_FILE="${OUTPUT}/result.txt"
+export RESULT_FILE
usage() {
echo "Usage: $0 [-s <true|false>]" 1>&2
exit 1
}
-while getopts "s:" o; do
+while getopts "s:h" o; do
case "$o" in
s) SKIP_INSTALL="${OPTARG}" ;;
- *) usage ;;
+ h|*) usage ;;
esac
done
install() {
dist_name
+ # shellcheck disable=SC2154
case "${dist}" in
- Debian|Ubuntu) pkgs="lsb-release" ;;
- Fedora|CentOS) pkgs="redhat-lsb-core" ;;
+ Debian|Ubuntu) install_deps "lsb-release" "${SKIP_INSTALL}";;
+ Fedora|CentOS) install_deps "redhat-lsb-core" "${SKIP_INSTALL}";;
+ Unknown) warn_msg "Unsupported distro: package install skipped" ;;
esac
-
- install_deps "${pkgs}" "${SKIP_INSTALL}"
}
run() {
+ # shellcheck disable=SC2039
local test="$1"
test_case_id="$(echo "${test}" | awk '{print $1}')"
echo
@@ -36,6 +39,7 @@ run() {
}
# Test run.
+! check_root && error_msg "Please run this script as root."
[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
mkdir -p "${OUTPUT}"
diff --git a/automated/linux/smoke/smoke.yaml b/automated/linux/smoke/smoke.yaml
index f20e6db..dc2891f 100644
--- a/automated/linux/smoke/smoke.yaml
+++ b/automated/linux/smoke/smoke.yaml
@@ -7,7 +7,10 @@ metadata:
- chase.qi@linaro.org
os:
- debian
+ - ubuntu
+ - centos
- fedora
+ - openembedded
scope:
- functional
devices:
@@ -16,6 +19,11 @@ metadata:
- juno
- hi6220-hikey
- apq8016-sbc
+ - mustang
+ - moonshot
+ - thunderX
+ - d03
+ - d05
params:
SKIP_INSTALL: "False"