Skip to content

Commit

Permalink
automated: linux: libhugetlbfs: use prebuilt overlays
Browse files Browse the repository at this point in the history
Make it possible to use prebuilt libhugetlbfs overlays.

Signed-off-by: Anders Roxell <[email protected]>
  • Loading branch information
roxell authored and nareshkamboju committed Jun 24, 2024
1 parent 6d6923b commit c44e2c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
18 changes: 15 additions & 3 deletions automated/linux/libhugetlbfs/libhugetlbfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TEST_PASS_LOG="${OUTPUT}/test_pass_log.txt"
TEST_FAIL_LOG="${OUTPUT}/test_fail_log.txt"
TEST_SKIP_LOG="${OUTPUT}/test_skip_log.txt"
CWD=""
LIBHUGETLBFS_PATH=""

WORD_SIZE="64"
VERSION="02df38e93e25e07f4d54edae94fb4ec90b7a2824"
Expand All @@ -20,9 +21,10 @@ usage() {
exit 1
}

while getopts "b:s:v:" o; do
while getopts "b:p:s:v:" o; do
case "$o" in
b) WORD_SIZE="${OPTARG}" ;;
p) LIBHUGETLBFS_PATH="${OPTARG}" ;;
s) SKIP_INSTALL="${OPTARG}" ;;
v) VERSION="${OPTARG}" ;;
*) usage ;;
Expand Down Expand Up @@ -163,9 +165,19 @@ install
# Setup libhugetlbfs mount point
libhugetlbfs_setup

PRE_BUILD_PATH="$(find /usr/lib*/libhugetlbfs -type f -name run_tests.py)"
if [ -n "${LIBHUGETLBFS_PATH}" ] && [ -d "${LIBHUGETLBFS_PATH}" ]
then
overlay=yes
else
LIBHUGETLBFS_PATH="$(find /usr/lib*/libhugetlbfs -type f -name run_tests.py)"
fi

if [ -n "${PRE_BUILD_PATH}" ]

if [ -n "${overlay}" ]
then
echo "pre built libhugtlbfs found in overlays"
cd "${LIBHUGETLBFS_PATH}" || exit
elif [ -n "${LIBHUGETLBFS_PATH}" ]
then
echo "pre built libhugetlbfs found on rootfs"
# shellcheck disable=SC2164
Expand Down
5 changes: 4 additions & 1 deletion automated/linux/libhugetlbfs/libhugetlbfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ params:
SKIP_INSTALL: "False"
VERSION: "02df38e93e25e07f4d54edae94fb4ec90b7a2824"

# Pre-installed tests
LIBHUGETLBFS_PATH: ""

run:
steps:
- cd ./automated/linux/libhugetlbfs/
- ./libhugetlbfs.sh -b "${WORD_SIZE}" -s "${SKIP_INSTALL}" -v "${VERSION}"
- ./libhugetlbfs.sh -b "${WORD_SIZE}" -p "${LIBHUGETLBFS_PATH}" -s "${SKIP_INSTALL}" -v "${VERSION}"
- ../../utils/send-to-lava.sh ./output/result.txt

0 comments on commit c44e2c1

Please sign in to comment.