summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2017-06-20 12:46:15 +0530
committerFathi Boudra <fathi.boudra@linaro.org>2017-06-20 13:03:45 +0000
commit272a858f359d277587dc2c155512d8581562ceec (patch)
treeb787e3636415a5a4f76bebbccb9af72df6d1102e
parentfee992c75d08cd935f78120787d574fc70d707a0 (diff)
linux: libhugetlbfs: fix pre-installed path
Generic way to detect run_tests.py is pre-installed. Change-Id: Ib55d9584709a6db83bcce1a125b04d917b6532b2 Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-xautomated/linux/libhugetlbfs/libhugetlbfs.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/automated/linux/libhugetlbfs/libhugetlbfs.sh b/automated/linux/libhugetlbfs/libhugetlbfs.sh
index 463fe46..73ad3e2 100755
--- a/automated/linux/libhugetlbfs/libhugetlbfs.sh
+++ b/automated/linux/libhugetlbfs/libhugetlbfs.sh
@@ -156,11 +156,13 @@ install
# Setup libhugetlbfs mount point
libhugetlbfs_setup
-if [ -d /usr/lib/libhugetlbfs ]
+PRE_BUILD_PATH="$(find /usr/lib*/libhugetlbfs -type f -name run_tests.py)"
+
+if [ -n "${PRE_BUILD_PATH}" ]
then
- echo "pre built /usr/lib/libhugetlbfs found on rootfs"
- # shellcheck disable=SC2164
- cd /usr/lib/libhugetlbfs
+ echo "pre built libhugetlbfs found on rootfs"
+ # shellcheck disable=SC2164
+ cd /usr/lib*/libhugetlbfs
else
# Build libhugetlbfs tests
libhugetlbfs_build_test