Add GStreamer AI_ML test suite#279
Conversation
|
@vijpatel22 Please update the script's execute permissions and address the errors reported by shelllint. https://github.com/qualcomm-linux/qcom-linux-testkit/actions/runs/21785074948/job/62885941654?pr=279 |
|
Hi @smuppand, I’ve pushed the latest changes. Could you please review. |
| # Optional: make sure we have network connectivity (kept from the | ||
| # original script) | ||
| # ------------------------------------------------------------------ | ||
| if command -v ensure_network_online >/dev/null 2>&1; then |
There was a problem hiding this comment.
- Skip download if required assets already exist (non-empty).
- Otherwise bring up Ethernet first (get_ethernet_interfaces, bringup_interface, try_dhcp_client_safe) and re-check connectivity (check_network_status / ensure_network_online).
- If Ethernet fails, try Wi-Fi fallback using get_wifi_interface + get_wifi_credentials + wifi_connect_nmcli/wifi_connect_wpa_supplicant + DHCP.
- If still offline/limited → SKIP (not FAIL), since downloads can’t proceed.
| - REPO_PATH=$PWD | ||
| - cd Runner/suites/Multimedia/GSTreamer/AI_ML/ | ||
| - ./run.sh --timeout "${TIMEOUT}" --gstdebug "${GST_DEBUG_LEVEL}" --output-video "${OUTPUT_VIDEO_PATH}" || true | ||
| - $REPO_PATH/Runner/utils/send-to-lava.sh AI_ML.res || true No newline at end of file |
There was a problem hiding this comment.
No newline at end of file.
Run.sh should handle proper exits, so there's no need to use || true for the send-to-lava.sh step.
|
|
||
| ### PASS | ||
| - **All pipelines** successfully run to PLAYING state without critical errors | ||
| - Output file contains `PASS AI_ML` |
There was a problem hiding this comment.
but your existing testkit convention is AI_ML PASS / AI_ML FAIL, and this run.sh currently prints PASS AI_ML format.
|
|
||
| ### FAIL | ||
| - **Any pipeline** fails to reach PLAYING state or encounters critical errors | ||
| - Output file contains `FAIL AI_ML` |
| # Source the environment and helper libraries. | ||
| # ---------------------------------------------------------------------- | ||
| # shellcheck disable=SC1090 | ||
| . "$INIT_ENV" |
There was a problem hiding this comment.
init_env sourcing is wrong (double-source + idempotence variable)
| TIMEOUT=${timeout:-60} # default 60 seconds | ||
|
|
||
| console_log="${name}_console.log" | ||
| gst_debug_log="${name}_gst_debug.log" |
There was a problem hiding this comment.
README expects ./logs/..., but run_pipeline_with_logs() currently writes object_detection_console.log in CWD, not ./logs/.
Create ./logs in run.sh and pass logdir to helper, or
Make helper write under ${GST_LOG_DIR:-./logs}.
| mkdir -p "$(dirname "${dest}")" | ||
|
|
||
| if command -v curl >/dev/null 2>&1; then | ||
| curl -fkL "${url}" -o "${dest}" |
There was a problem hiding this comment.
doesn’t verify download success / partial downloads
curl -fkL ... -o is okay, but you should check exit code and file is non-empty to avoid silent failures.
after download: [ -s "$dest" ] || return 1
| cp -r "${tmp_dir}"/* "${dest_dir}/" | ||
|
|
||
| # Clean up the temporary folder; | ||
| rm -rf "${tmp_dir}" "${zip_path}" |
There was a problem hiding this comment.
removes the zip file always. Remove zip only on success, or gate removal behind env var.
| fi | ||
|
|
||
| # ---- Get the actual size ------------------------------------------------- | ||
| size_in_bytes=$(stat -c %s "$input_file_path" 2>/dev/null) || { |
There was a problem hiding this comment.
equires GNU stat -c %s
size_in_bytes=$(stat -c %s "$f" 2>/dev/null || wc -c <"$f" 2>/dev/null)
| printf '%s\n' "filesrc location=${file} ! ${dec} ! audioconvert ! audioresample ! ${sinkElem}" | ||
| return 0 | ||
| } | ||
|
|
There was a problem hiding this comment.
keep mode consistent with existing utilities (usually 100755).
Signed-off-by: Vij Patel <vijpatel@qti.qualcomm.com>
Signed-off-by: Vij Patel <vijpatel@qti.qualcomm.com>
Signed-off-by: Vij Patel <vijpatel@qti.qualcomm.com>
Signed-off-by: root <root@lab7816.ap.qualcomm.com>
ce24ad8 to
6479657
Compare
PR – Add AI/ML GStreamer Test Suite
Overview
This pull request introduces, a self‑contained test suite for the AI/ML GStreamer suite located at:
Runner/suites/Multimedia/GStreamer/AI_ML/run.sh
The script automates the end‑to‑end validation of object‑detection and image‑classification pipelines that leverage Qualcomm‑specific GStreamer plugins.
It will:
🛠️ What’s Added / Modified
Runner/suites/Multimedia/GStreamer/AI_ML/run.sh- New executable script (the full implementation is attached in this PR).Runner/suites/Multimedia/GStreamer/AI_ML/AI_ML.yaml- New YAML fileRunner/suites/Multimedia/GStreamer/AI_ML/Readme.md- New Readme fileRunner/utils/lib_gstreamer.sh- Added new functions.