Skip to content

Commit 22ca63b

Browse files
committed
IRIS: add default app/firmware fallbacks for test runner
- Prefer user-specified --app; otherwise search PATH, then /usr/bin/iris_v4l2_test, then /data/vendor/iris_test_app/iris_v4l2_test. - For Kodiak downstream, if --downstream-fw is not given, auto-use /data/vendor/iris_test_app/firmware/vpu20_1v.mbn when present. - Keep existing names/logic; only path resolution and default selection updated. - Log which app/firmware paths are chosen to aid debugging. - No changes to test flow, results, or stack-switch behavior. Signed-off-by: Srikanth Muppandam <[email protected]>
1 parent 115d9af commit 22ca63b

File tree

2 files changed

+42
-27
lines changed

2 files changed

+42
-27
lines changed

Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,31 @@ if [ -n "$VIDEO_APP" ] && [ -f "$VIDEO_APP" ] && [ ! -x "$VIDEO_APP" ]; then
241241
fi
242242
fi
243243

244-
# Decide final app path: if --app given, require it; otherwise try default path, else PATH
244+
# ---- Default firmware path for Kodiak downstream if CLI not given ----
245+
if [ -z "${VIDEO_FW_DS:-}" ]; then
246+
default_fw="/data/vendor/iris_test_app/firmware/vpu20_1v.mbn"
247+
if [ -f "$default_fw" ]; then
248+
VIDEO_FW_DS="$default_fw"
249+
export VIDEO_FW_DS
250+
log_info "Using default downstream firmware path: $VIDEO_FW_DS"
251+
fi
252+
fi
253+
254+
# Decide final app path: if --app given, require it; otherwise search PATH, /usr/bin, /data/vendor/iris_test_app
245255
final_app=""
246256

247257
if [ -n "$VIDEO_APP" ] && [ -x "$VIDEO_APP" ]; then
248258
final_app="$VIDEO_APP"
249259
else
250-
if [ "$VIDEO_APP" = "/usr/bin/iris_v4l2_test" ]; then
251-
if command -v iris_v4l2_test >/dev/null 2>&1; then
252-
final_app="$(command -v iris_v4l2_test)"
260+
if command -v iris_v4l2_test >/dev/null 2>&1; then
261+
final_app="$(command -v iris_v4l2_test)"
262+
else
263+
if [ -x "/usr/bin/iris_v4l2_test" ]; then
264+
final_app="/usr/bin/iris_v4l2_test"
265+
else
266+
if [ -x "/data/vendor/iris_test_app/iris_v4l2_test" ]; then
267+
final_app="/data/vendor/iris_test_app/iris_v4l2_test"
268+
fi
253269
fi
254270
fi
255271
fi

Runner/utils/lib_video.sh

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -451,42 +451,41 @@ video_normalize_stack() {
451451
video_detect_platform() {
452452
model=""
453453
compat=""
454-
454+
455455
if [ -r /proc/device-tree/model ]; then
456456
model=$(tr -d '\000' </proc/device-tree/model 2>/dev/null)
457457
fi
458-
458+
459459
if [ -r /proc/device-tree/compatible ]; then
460460
compat=$(tr -d '\000' </proc/device-tree/compatible 2>/dev/null)
461461
fi
462-
462+
463463
s=$(printf '%s\n%s\n' "$model" "$compat" | tr '[:upper:]' '[:lower:]')
464-
465-
echo "$s" | grep -q "qcs9100" && {
466-
printf '%s\n' "lemans"
467-
return 0
468-
}
469-
echo "$s" | grep -q "qcs8300" && {
470-
printf '%s\n' "monaco"
471-
return 0
472-
}
473-
echo "$s" | grep -q "qcs6490" && {
474-
printf '%s\n' "kodiak"
475-
return 0
476-
}
477-
echo "$s" | grep -q "ride-sx" && echo "$s" | grep -q "9100" && {
464+
465+
# Monaco: qcs8300-ride, iq-8275-evk, qcs8275, generic qcs8300, or ride-sx+8300
466+
monaco_pat='qcs8300-ride|iq-8275-evk|qcs8275|qcs8300|ride-sx.*8300|8300.*ride-sx'
467+
468+
# LeMans: qcs9100-ride, qcs9075, generic qcs9100, or ride-sx+9100
469+
lemans_pat='qcs9100-ride|qcs9075|qcs9100|ride-sx.*9100|9100.*ride-sx'
470+
471+
# Kodiak: qcs6490, qcm6490, or rb3+6490
472+
kodiak_pat='qcs6490|qcm6490|rb3.*6490|6490.*rb3'
473+
474+
if printf '%s' "$s" | grep -Eq "$lemans_pat"; then
478475
printf '%s\n' "lemans"
479476
return 0
480-
}
481-
echo "$s" | grep -q "ride-sx" && echo "$s" | grep -q "8300" && {
477+
fi
478+
479+
if printf '%s' "$s" | grep -Eq "$monaco_pat"; then
482480
printf '%s\n' "monaco"
483481
return 0
484-
}
485-
echo "$s" | grep -q "rb3" && echo "$s" | grep -q "6490" && {
482+
fi
483+
484+
if printf '%s' "$s" | grep -Eq "$kodiak_pat"; then
486485
printf '%s\n' "kodiak"
487486
return 0
488-
}
489-
487+
fi
488+
490489
printf '%s\n' "unknown"
491490
}
492491

0 commit comments

Comments
 (0)