Skip to content

Commit c44e2c1

Browse files
roxellnareshkamboju
authored andcommitted
automated: linux: libhugetlbfs: use prebuilt overlays
Make it possible to use prebuilt libhugetlbfs overlays. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
1 parent 6d6923b commit c44e2c1

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

automated/linux/libhugetlbfs/libhugetlbfs.sh

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ TEST_PASS_LOG="${OUTPUT}/test_pass_log.txt"
1111
TEST_FAIL_LOG="${OUTPUT}/test_fail_log.txt"
1212
TEST_SKIP_LOG="${OUTPUT}/test_skip_log.txt"
1313
CWD=""
14+
LIBHUGETLBFS_PATH=""
1415

1516
WORD_SIZE="64"
1617
VERSION="02df38e93e25e07f4d54edae94fb4ec90b7a2824"
@@ -20,9 +21,10 @@ usage() {
2021
exit 1
2122
}
2223

23-
while getopts "b:s:v:" o; do
24+
while getopts "b:p:s:v:" o; do
2425
case "$o" in
2526
b) WORD_SIZE="${OPTARG}" ;;
27+
p) LIBHUGETLBFS_PATH="${OPTARG}" ;;
2628
s) SKIP_INSTALL="${OPTARG}" ;;
2729
v) VERSION="${OPTARG}" ;;
2830
*) usage ;;
@@ -163,9 +165,19 @@ install
163165
# Setup libhugetlbfs mount point
164166
libhugetlbfs_setup
165167

166-
PRE_BUILD_PATH="$(find /usr/lib*/libhugetlbfs -type f -name run_tests.py)"
168+
if [ -n "${LIBHUGETLBFS_PATH}" ] && [ -d "${LIBHUGETLBFS_PATH}" ]
169+
then
170+
overlay=yes
171+
else
172+
LIBHUGETLBFS_PATH="$(find /usr/lib*/libhugetlbfs -type f -name run_tests.py)"
173+
fi
167174

168-
if [ -n "${PRE_BUILD_PATH}" ]
175+
176+
if [ -n "${overlay}" ]
177+
then
178+
echo "pre built libhugtlbfs found in overlays"
179+
cd "${LIBHUGETLBFS_PATH}" || exit
180+
elif [ -n "${LIBHUGETLBFS_PATH}" ]
169181
then
170182
echo "pre built libhugetlbfs found on rootfs"
171183
# shellcheck disable=SC2164

automated/linux/libhugetlbfs/libhugetlbfs.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ params:
3232
SKIP_INSTALL: "False"
3333
VERSION: "02df38e93e25e07f4d54edae94fb4ec90b7a2824"
3434

35+
# Pre-installed tests
36+
LIBHUGETLBFS_PATH: ""
37+
3538
run:
3639
steps:
3740
- cd ./automated/linux/libhugetlbfs/
38-
- ./libhugetlbfs.sh -b "${WORD_SIZE}" -s "${SKIP_INSTALL}" -v "${VERSION}"
41+
- ./libhugetlbfs.sh -b "${WORD_SIZE}" -p "${LIBHUGETLBFS_PATH}" -s "${SKIP_INSTALL}" -v "${VERSION}"
3942
- ../../utils/send-to-lava.sh ./output/result.txt

0 commit comments

Comments
 (0)