summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-01-13 16:33:26 +0800
committerChase Qi <chase.qi@linaro.org>2017-01-13 16:36:50 +0800
commit70e979760095e06693e2e4f9a823214b267fc589 (patch)
tree2492d531a13f04df9edba730caeca77643e9c689 /automated/linux
parent88cf9ea68aec68538a88094869f4bad50eedd8d9 (diff)
downloadtest-definitions-pipe-70e979760095e06693e2e4f9a823214b267fc589.tar.gz
automated: linux: fix smoke test on OE
Change-Id: I91da729db10c08827f285f65bc525948747797b6 Signed-off-by: Chase Qi <chase.qi@linaro.org>
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"