Skip to content

Commit d37f550

Browse files
committed
tests: Mark as SKIP if dependencies are missing
- Updated check_dependencies to SKIP tests with missing tools - CI/LAVA now reports SKIP (not FAIL) when commands are absent Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent cb65b42 commit d37f550

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Runner/utils/functestlib.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,22 @@ unload_kernel_module() {
132132
# --- Dependency check ---
133133
check_dependencies() {
134134
missing=0
135+
missing_cmds=""
135136
for cmd in "$@"; do
136137
if ! command -v "$cmd" >/dev/null 2>&1; then
137-
log_error "Required command '$cmd' not found in PATH."
138+
log_warn "Required command '$cmd' not found in PATH."
138139
missing=1
140+
missing_cmds="$missing_cmds $cmd"
139141
fi
140142
done
141-
[ "$missing" -ne 0 ] && exit 1
143+
if [ "$missing" -ne 0 ]; then
144+
testname="${TESTNAME:-}"
145+
log_skip "${testname:-UnknownTest} SKIP: missing dependencies:$missing_cmds"
146+
if [ -n "$testname" ]; then
147+
echo "$testname SKIP" > "./$testname.res"
148+
fi
149+
exit 0
150+
fi
142151
}
143152

144153
# --- Test case directory lookup ---

0 commit comments

Comments
 (0)