From 70e979760095e06693e2e4f9a823214b267fc589 Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Fri, 13 Jan 2017 16:33:26 +0800 Subject: automated: linux: fix smoke test on OE Change-Id: I91da729db10c08827f285f65bc525948747797b6 Signed-off-by: Chase Qi --- automated/linux/smoke/smoke.sh | 16 ++++++++++------ automated/linux/smoke/smoke.yaml | 8 ++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'automated/linux') 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 ]" 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" -- cgit v1.2.3