summaryrefslogtreecommitdiff
path: root/automated
diff options
context:
space:
mode:
authorLei Yang <Lei.Yang@windriver.com>2017-10-23 21:31:21 +0800
committerChase Qi <chase.qi@linaro.org>2017-10-24 10:23:48 +0800
commited3c4394c2432091d80fb529643c08e06289315c (patch)
tree2d37f0ba3cb196d68b4207c5f6d9b6d47ec8c6d5 /automated
parent6f8e37a6bd1b5bef93d939e4681742db6d33e885 (diff)
fio-test: use pre-installed binary if already installed
Change-Id: Idac895e3c60da06befefa21457a30f9146d4b118 Signed-off-by: Lei Yang <Lei.Yang@windriver.com>
Diffstat (limited to 'automated')
-rwxr-xr-xautomated/linux/fio-test/fio-test.sh40
1 files changed, 22 insertions, 18 deletions
diff --git a/automated/linux/fio-test/fio-test.sh b/automated/linux/fio-test/fio-test.sh
index fa91af2..cdbc23f 100755
--- a/automated/linux/fio-test/fio-test.sh
+++ b/automated/linux/fio-test/fio-test.sh
@@ -37,24 +37,28 @@ fio_build_install() {
}
install() {
- dist_name
- # shellcheck disable=SC2154
- case "${dist}" in
- debian|ubuntu)
- pkgs="fio"
- install_deps "${pkgs}" "${SKIP_INSTALL}"
- ;;
- fedora|centos)
- pkgs="libaio-devel gcc tar wget"
- install_deps "${pkgs}" "${SKIP_INSTALL}"
- fio_build_install
- ;;
- # When build do not have package manager
- # Assume development tools pre-installed
- *)
- fio_build_install
- ;;
- esac
+ if which fio; then
+ info_msg "fio has been already installed"
+ else
+ dist_name
+ # shellcheck disable=SC2154
+ case "${dist}" in
+ debian|ubuntu)
+ pkgs="fio"
+ install_deps "${pkgs}" "${SKIP_INSTALL}"
+ ;;
+ fedora|centos)
+ pkgs="libaio-devel gcc tar wget"
+ install_deps "${pkgs}" "${SKIP_INSTALL}"
+ fio_build_install
+ ;;
+ # When build do not have package manager
+ # Assume development tools pre-installed
+ *)
+ fio_build_install
+ ;;
+ esac
+ fi
}
fio_test() {