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>
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 @@
 # 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