Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions automated/linux/ltp/ltp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BUILD_FROM_TAR="false"
SHARD_NUMBER=1
SHARD_INDEX=1

RUNNER="kirk"
KIRK_PATH="kirk"
KIRK_WORKERS=1
EXTRA_KIRK_ARGS=""

Expand All @@ -50,6 +50,7 @@ usage() {
[-v LTP_VERSION]
[-M Timeout_Multiplier]
[-R root_password]
[-r path to kirk binary ]
[-u git url]
[-p build directory]
[-t build from tarfile ]
Expand All @@ -60,7 +61,7 @@ usage() {
exit 0
}

while getopts "M:T:S:b:d:g:e:i:s:v:R:u:p:t:c:n:w:k:" arg; do
while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do
case "$arg" in
T)
TST_CMDFILES="${OPTARG}"
Expand Down Expand Up @@ -116,6 +117,11 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:u:p:t:c:n:w:k:" arg; do
# Slow machines need more timeout Default is 5min and multiply * MINUTES
M) export LTP_TIMEOUT_MUL="${OPTARG}";;
R) export PASSWD="${OPTARG}";;
r)
if [[ "$OPTARG" != '' ]]; then
KIRK_PATH="$OPTARG"
fi
;;
u)
if [[ "$OPTARG" != '' ]]; then
TEST_GIT_URL="$OPTARG"
Expand Down Expand Up @@ -184,20 +190,16 @@ run_ltp() {
cat runtest/shardfile
echo "===========End Tests to run ==============="

if [ -z "${RUNNER}" ] && [ -x "${LTP_INSTALL_PATH}/kirk" ]; then
RUNNER="${LTP_INSTALL_PATH}/kirk"
fi

eval "${RUNNER}" --version
eval "${KIRK_PATH}" --version
# shellcheck disable=SC2181
if [ $? -ne "0" ]; then
error_msg "${RUNNER} is not installed into the file system."
error_msg "${KIRK_PATH} is not installed into the file system."
fi
if [ "${KIRK_WORKERS}" = "max" ]; then
KIRK_WORKERS=$(grep ^processor /proc/cpuinfo | wc -l)
fi
export LTP_COLORIZE_OUTPUT=0
pipe0_status "${RUNNER} ${EXTRA_KIRK_ARGS} --run-suite shardfile \
pipe0_status "${KIRK_PATH} ${EXTRA_KIRK_ARGS} --run-suite shardfile \
-d ${LTP_TMPDIR} \
${SKIPFILE_PATH:+--skip-file} ${SKIPFILE_PATH} \
${KIRK_WORKERS:+--workers} ${KIRK_WORKERS} \
Expand Down
5 changes: 4 additions & 1 deletion automated/linux/ltp/ltp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ params:
# Extra arguments to pass directly to the kirk runner
EXTRA_KIRK_ARGS: ""

# Path to the kirk binary, defaults to 'kirk' on PATH
KIRK_PATH: kirk

# If the following parameter is set, then the LTP suite is
# cloned and used unconditionally. In particular, the version
# of the suite is set to the commit pointed to by the
Expand Down Expand Up @@ -78,5 +81,5 @@ params:
run:
steps:
- cd ./automated/linux/ltp/
- ./ltp.sh -T "${TST_CMDFILES}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}" -k "${EXTRA_KIRK_ARGS}" -b "${BOARD}" -d "${LTP_TMPDIR}" -g "${BRANCH}" -e "${ENVIRONMENT}" -i "${LTP_INSTALL_PATH}" -S "${SKIPFILE}" -p "${TEST_DIR}" -u "${TEST_GIT_URL}" -t "${BUILD_FROM_TAR}" -n "${SHARD_NUMBER}" -c "${SHARD_INDEX}" -w "${KIRK_WORKERS}"
- ./ltp.sh -T "${TST_CMDFILES}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}" -r "${KIRK_PATH}" -k "${EXTRA_KIRK_ARGS}" -b "${BOARD}" -d "${LTP_TMPDIR}" -g "${BRANCH}" -e "${ENVIRONMENT}" -i "${LTP_INSTALL_PATH}" -S "${SKIPFILE}" -p "${TEST_DIR}" -u "${TEST_GIT_URL}" -t "${BUILD_FROM_TAR}" -n "${SHARD_NUMBER}" -c "${SHARD_INDEX}" -w "${KIRK_WORKERS}"
- ../../utils/send-to-lava.sh ./output/result.txt
Loading