diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2017-02-07 00:42:42 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2017-02-07 00:42:42 +0530 |
commit | b3cee92f42ccbf8e99f177d5f157a8ea382e42bc (patch) | |
tree | 4bc1ec4bf40d9c7215a965a8ab29a4fd4f80edd6 | |
parent | 9500bca141aedffb1bf6caa13ec096cca1377e04 (diff) |
kselftest: fix install section
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-x | automated/linux/kselftest/kselftest.sh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/automated/linux/kselftest/kselftest.sh b/automated/linux/kselftest/kselftest.sh index 4096c1c..3065bf7 100755 --- a/automated/linux/kselftest/kselftest.sh +++ b/automated/linux/kselftest/kselftest.sh @@ -29,19 +29,23 @@ parse_output() { sed -i -e 's/]//g' "${RESULT_FILE}" } -dist_name -# shellcheck disable=SC2154 -case "${dist}" in - Debian|Ubuntu) pkgs="sed wget xz-utils" ;; - CentOS|Fedora) pkgs="sed wget xz" ;; -esac -! check_root && error_msg "You need to be root to run testing!" -install_deps "${pkgs}" "${SKIP_INSTALL}" +install() { + dist_name + # shellcheck disable=SC2154 + case "${dist}" in + Debian|Ubuntu) install_deps "sed wget xz-utils" "${SKIP_INSTALL}" ;; + CentOS|Fedora) install_deps "sed wget xz" "${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 [ -d "${KSELFTEST_PATH}" ]; then echo "kselftests found on rootfs" cd "${KSELFTEST_PATH}" |