summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-01-13 19:13:49 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-01-13 14:52:54 +0000
commit270ba9bb592c8ed2a086875de9f495cb6967f480 (patch)
treeec2dc0d6f84acc6a0988a3eeb8b1fcbc5d500995 /automated/linux
parent9cb610fb72b93c43417041eaa3c40d907ded154e (diff)
downloadtest-definitions-pipe-270ba9bb592c8ed2a086875de9f495cb6967f480.tar.gz
automated: linux: fix toolchain smoke test on OE
Change-Id: I182c3ec136ab83407367a20a358ad15070c76b98 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/linux')
-rwxr-xr-xautomated/linux/toolchain-smoke/toolchain-smoke.sh23
-rw-r--r--automated/linux/toolchain-smoke/toolchain-smoke.yaml1
2 files changed, 9 insertions, 15 deletions
diff --git a/automated/linux/toolchain-smoke/toolchain-smoke.sh b/automated/linux/toolchain-smoke/toolchain-smoke.sh
index 17b30f8..2dc76ed 100755
--- a/automated/linux/toolchain-smoke/toolchain-smoke.sh
+++ b/automated/linux/toolchain-smoke/toolchain-smoke.sh
@@ -1,5 +1,6 @@
#!/bin/sh -e
+# shellcheck disable=SC1091
. ../../lib/sh-test-lib
OUTPUT="$(pwd)/output"
RESULT_FILE="${OUTPUT}/result.txt"
@@ -23,34 +24,26 @@ install() {
dist_name
# shellcheck disable=SC2154
case "${dist}" in
- Debian|Ubuntu)
- pkgs="build-essential"
- install_deps "${pkgs}"
- ;;
- Fedora|CentOS)
- pkgs="gcc glibc-static"
- install_deps "${pkgs}"
- ;;
- *) error_msg "Unsupported distribution" ;;
+ Debian|Ubuntu) install_deps "build-essential" "${SKIP_INSTALL}" ;;
+ Fedora|CentOS) install_deps "gcc glibc-static" "${SKIP_INSTALL}" ;;
+ Unknown) warn_msg "Unsupported distro: package install skipped" ;;
esac
}
! check_root && error_msg "You need to be root to run this script."
[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
mkdir -p "${OUTPUT}"
+cd "${OUTPUT}"
+
+install
-if [ "${SKIP_INSTALL}" = "True" ] || [ "${SKIP_INSTALL}" = "true" ]; then
- info_msg "gcc package installation skipped"
-else
- install
-fi
FLAGS=""
if [ "${STATIC}" = "true" ] || [ "${STATIC}" = "True" ]; then
FLAGS="-static"
fi
skip_list="execute_binary"
-command="gcc ${FLAGS} -o hello hello.c"
+command="gcc ${FLAGS} -o hello ../hello.c"
run_test_case "${command}" "gcc${FLAGS}" "${skip_list}"
command="./hello | grep -x 'Hello world'"
diff --git a/automated/linux/toolchain-smoke/toolchain-smoke.yaml b/automated/linux/toolchain-smoke/toolchain-smoke.yaml
index 8d7c1ab..a9d6481 100644
--- a/automated/linux/toolchain-smoke/toolchain-smoke.yaml
+++ b/automated/linux/toolchain-smoke/toolchain-smoke.yaml
@@ -9,6 +9,7 @@ metadata:
- ubuntu
- fedora
- centos
+ - openembedded
scope:
- functional
devices: