|
1 | 1 | metadata: |
2 | 2 | format: Lava-Test Test Definition 1.0 |
3 | | - name: Video_V4L2_With_Secrets |
4 | | - description: "Run Video V4L2 runner; use LAVA secrets for Wi-Fi; auto-args for kodiak vs lemans/monaco; run base & overlay" |
| 3 | + name: Video_V4L2_LocalClips |
| 4 | + description: "Run Video V4L2 runner with local clips tar and custom .ko dir; auto-args for kodiak vs lemans/monaco; run base & overlay" |
5 | 5 | maintainer: |
6 | 6 | |
7 | 7 | os: |
8 | 8 | - openembedded |
9 | 9 | scope: |
10 | 10 | - functional |
11 | | - |
12 | 11 | run: |
13 | 12 | steps: |
14 | 13 | - cd Runner |
15 | 14 | - export REPO_ROOT="$PWD" |
16 | | - - export TARGET="${TARGET:-}" # expected values: kodiak | lemans | monaco (case-insensitive) |
17 | | - |
18 | | - # Read Wi-Fi credentials from LAVA-provided secrets (exported as env vars in the job) |
19 | | - - export SSID="${LAVA_WIFI_SSID:-}" |
20 | | - - export PASSWORD="${LAVA_WIFI_PASSWORD:-}" |
| 15 | + - export TARGET="${TARGET:-}" # kodiak | lemans | monaco (case-insensitive) |
21 | 16 |
|
22 | | - # Build args for run.sh based on TARGET; always pass secrets; add downstream FW only for kodiak |
23 | 17 | - | |
24 | 18 | RPATH="$REPO_ROOT/suites/Multimedia/Video/Video_V4L2_Runner/run.sh" |
25 | 19 | RESFILE="$REPO_ROOT/suites/Multimedia/Video/Video_V4L2_Runner/Video_V4L2_Runner.res" |
26 | | - ARGS="" |
| 20 | +
|
| 21 | + # Custom media bundle (local) paths |
| 22 | + CLIPS_TAR="/data/vendor/iris_test_app/video_clips_iris.tar.gz" |
| 23 | + CLIPS_DEST="/data/vendor/iris_test_app/clips" |
| 24 | +
|
| 25 | + # Custom downstream module location (directory containing iris_vpu.ko) |
| 26 | + KO_DIR="/data/vendor/iris_test_app" |
| 27 | +
|
| 28 | + # Optional: downstream firmware needed on Kodiak overlay |
| 29 | + DS_FW="/data/vendor/iris_test_app/vpu20_p1_gen2.mbn" |
| 30 | +
|
| 31 | + # Normalize/derive platform flag |
27 | 32 | TL="$(printf '%s' "${TARGET:-}" | tr '[:upper:]' '[:lower:]')" |
28 | 33 | case "$TL" in |
29 | | - kodiak) |
30 | | - ARGS="$ARGS --platform kodiak --app /data/vendor/iris_test_app/iris_v4l2_test --ssid \"$SSID\" --password \"$PASSWORD\" --downstream-fw /data/vendor/iris_test_app/vpu20_p1_gen2.mbn" |
31 | | - ;; |
32 | | - lemans) |
33 | | - ARGS="$ARGS --platform lemans --ssid \"$SSID\" --password \"$PASSWORD\"" --app /data/vendor/iris_test_app/iris_v4l2_test |
34 | | - ;; |
35 | | - monaco) |
36 | | - ARGS="$ARGS --platform monaco --ssid \"$SSID\" --password \"$PASSWORD\"" --app /data/vendor/iris_test_app/iris_v4l2_test |
37 | | - ;; |
38 | | - *) |
39 | | - # Unknown or not provided: still pass secrets; platform autodetect in run.sh |
40 | | - ARGS="$ARGS --ssid \"$SSID\" --password \"$PASSWORD\"" |
41 | | - ;; |
| 34 | + kodiak|lemans|monaco) PLAT="--platform $TL" ;; |
| 35 | + *) PLAT="" ;; # autodetect |
42 | 36 | esac |
43 | | - echo "TARGET=${TARGET:-unset} ARGS=$ARGS" |
44 | 37 |
|
45 | | - # Run base (upstream) then overlay (downstream) |
| 38 | + # Common args (clips local, no Wi-Fi or TAR_URL needed) |
| 39 | + ARGS_COMMON="--clips-tar $CLIPS_TAR --clips-dest $CLIPS_DEST --app /data/vendor/iris_test_app/iris_v4l2_test $PLAT --retry-on-fail 2 --loglevel 15" |
| 40 | +
|
| 41 | + # --- BASE (upstream): NO ko args here --- |
| 42 | + ARGS_BASE="--stack base $ARGS_COMMON" |
| 43 | +
|
| 44 | + # --- OVERLAY (downstream): add ko args; on kodiak also add downstream FW --- |
| 45 | + ARGS_OVERLAY="--stack overlay $ARGS_COMMON --ko-dir $KO_DIR --ko-prefer-custom" |
| 46 | + if [ "$TL" = "kodiak" ]; then |
| 47 | + ARGS_OVERLAY="$ARGS_OVERLAY --downstream-fw $DS_FW" |
| 48 | + fi |
| 49 | +
|
| 50 | + echo "BASE ARGS: $ARGS_BASE" |
| 51 | + echo "OVERLAY ARGS: $ARGS_OVERLAY" |
| 52 | +
|
| 53 | + # Run BASE (upstream) |
46 | 54 | # shellcheck disable=SC2086 |
47 | | - sh -lc "$RPATH --stack base $ARGS" || true |
| 55 | + sh -lc "$RPATH $ARGS_BASE" || true |
48 | 56 | "$REPO_ROOT/utils/send-to-lava.sh" "$RESFILE" || true |
49 | 57 |
|
| 58 | + # Run OVERLAY (downstream) |
50 | 59 | # shellcheck disable=SC2086 |
51 | | - sh -lc "$RPATH --stack overlay $ARGS" || true |
| 60 | + sh -lc "$RPATH $ARGS_OVERLAY" || true |
52 | 61 | "$REPO_ROOT/utils/send-to-lava.sh" "$RESFILE" || true |
53 | 62 |
|
54 | 63 | # Optional roll-up (ignored if absent) |
|
0 commit comments