Skip to content
Merged
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
13 changes: 11 additions & 2 deletions Runner/utils/functestlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,22 @@ unload_kernel_module() {
# --- Dependency check ---
check_dependencies() {
missing=0
missing_cmds=""
for cmd in "$@"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
log_error "Required command '$cmd' not found in PATH."
log_warn "Required command '$cmd' not found in PATH."
missing=1
missing_cmds="$missing_cmds $cmd"
fi
done
[ "$missing" -ne 0 ] && exit 1
if [ "$missing" -ne 0 ]; then
testname="${TESTNAME:-}"
log_skip "${testname:-UnknownTest} SKIP: missing dependencies:$missing_cmds"
if [ -n "$testname" ]; then
echo "$testname SKIP" > "./$testname.res"
fi
exit 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit 1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit 1 ?

AFAIK, If you use exit 1, most CI/test systems will treat it as a FAIL, not SKIP.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's correct as far as I can tell. In the LAVA test plan here we use || true to avoid this problem. I'm fine leaving it like it is.

fi
}

# --- Test case directory lookup ---
Expand Down
Loading