@@ -10,19 +10,28 @@ Video scripts automates the validation of video encoding and decoding capabiliti
1010## Features
1111
1212- V4L2 driver level test
13- - Encoding YUV to H264 bitstream
14- - Decoding H264 bitstream to YUV
13+ - Encoding YUV to H264/H265 bitstream
14+ - Decoding H264/H265/VP9 bitstream to YUV
1515- Compatible with Yocto-based root filesystem
16+ - Supports both encode and decode test modes.
17+ - Parses and runs multiple JSON config files.
18+ - Automatically fetches missing input clips from a predefined URL.
19+ - Supports timeout, repeat, dry-run, and JUnit XML output.
20+ - Performs dmesg scanning for kernel errors.
21+ - Generates summary reports.
1622
1723## Prerequisites
1824
1925Ensure the following components are present in the target Yocto build:
2026
2127- ` iris_v4l2_test ` (available in /usr/bin/) - this test app can be compiled from https://github.com/quic/v4l-video-test-app
22- - input json file for iris_v4l2_test app
28+ - input json config files for encode/decode tests
2329- input bitstream for decode script
2430- input YUV for encode script
2531- Write access to root filesystem (for environment setup)
32+ - POSIX shell utilities: grep, sed, awk, find, sort
33+ - Optional: run_with_timeout function from functestlib.sh
34+ - Internet access (for fetching missing clips)
2635
2736## Directory Structure
2837
@@ -31,12 +40,16 @@ Runner/
3140├── suites/
3241│ ├── Multimedia/
3342│ │ ├── Video/
34- │ │ │ ├── iris_v4l2_video_encode/
35- │ │ │ │ ├── H264Encoder.json
43+ │ │ │ ├── Video_V4L2_Runner/
44+ │ │ │ │ ├── h264Decoder.json
45+ │ │ │ │ ├── h265Decoder.json
46+ │ │ │ │ ├── vp9Decoder.json
47+ │ │ │ │ ├── h264Encoder.json
48+ │ │ │ │ ├── h265Encoder.json
3649│ │ │ │ ├── run.sh
37- │ │ │ ├── iris_v4l2_video_decode/
38- │ │ │ │ ├── H264Decoder.json
39- │ │ │ │ ├── run .sh
50+ │ │ │ ├── README_Video.md
51+ ├── utils/
52+ │ ├── lib_video .sh
4053```
4154
4255## Usage
@@ -55,24 +68,89 @@ git clone <this-repo>
5568cd <this-repo>
5669scp -r Runner user@target_device_ip:<Path in device>
5770ssh user@target_device_ip
58- cd <Path in device>/Runner && ./run-test.sh iris_v4l2_video_encode
71+ cd <Path in device>/Runner && ./run-test.sh Video_V4L2_Runner
5972```
6073Sample output:
6174```
62- sh-5.2# cd <Path in device>/Runner && ./run-test.sh iris_v4l2_video_encode
63- [Executing test case: <Path in device>/Runner/suites/Multimedia/Video/iris_v4l2_video_encode] 1980-01-08 22:22:15 -
64- [INFO] 1980-01-08 22:22:15 - -----------------------------------------------------------------------------------------
65- [INFO] 1980-01-08 22:22:15 - -------------------Starting iris_v4l2_video_encode Testcase----------------------------
66- [INFO] 1980-01-08 22:22:15 - Checking if dependency binary is available
67- [PASS] 1980-01-08 22:22:15 - Test related dependencies are present.
68- ...
69- [PASS] 1980-01-08 22:22:17 - iris_v4l2_video_encode : Test Passed
70- [INFO] 1980-01-08 22:22:17 - -------------------Completed iris_v4l2_video_encode Testcase----------------------------
75+ sh-5.2# ./run-test.sh Video_V4L2_Runner
76+ [Executing test case: Video_V4L2_Runner] 2025-09-02 05:08:36 -
77+ [INFO] 2025-09-02 05:08:36 - ----------------------------------------------------------------------
78+ [INFO] 2025-09-02 05:08:36 - ------------------ Starting Video_V4L2_Runner (generic runner) ----------------
79+ [INFO] 2025-09-02 05:08:36 - === Initialization ===
80+ [INFO] 2025-09-02 05:08:36 - TIMEOUT=60s STRICT=0 DMESG_SCAN=1 SUCCESS_RE=SUCCESS
81+ [INFO] 2025-09-02 05:08:36 - LOGLEVEL=15
82+ [INFO] 2025-09-02 05:08:36 - REPEAT=1 REPEAT_DELAY=0s REPEAT_POLICY=all
83+ [INFO] 2025-09-02 05:08:36 - No config argument passed, searching for JSON files in ./Runner/suites/Multimedia/Video/
84+ [INFO] 2025-09-02 05:08:36 - Configs to run:
85+ - ./Runner/suites/Multimedia/Video/Video_V4L2_Runner/h264Decoder.json
86+ - ./Runner/suites/Multimedia/Video/Video_V4L2_Runner/h264Encoder.json
87+ - ./Runner/suites/Multimedia/Video/Video_V4L2_Runner/h265Decoder.json
88+ - ./Runner/suites/Multimedia/Video/Video_V4L2_Runner/h265Encoder.json
89+ - ./Runner/suites/Multimedia/Video/Video_V4L2_Runner/vp9Decoder.json
90+ [INFO] 2025-09-02 05:08:37 - No relevant, non-benign errors for modules [oom|memory|BUG|hung task|soft lockup|hard lockup|rcu|page allocation failure|I/O error] in recent dmesg.
91+ [PASS] 2025-09-02 05:08:37 - [Decode1] PASS (1/1 ok)
92+ [INFO] 2025-09-02 05:08:39 - No relevant, non-benign errors for modules [oom|memory|BUG|hung task|soft lockup|hard lockup|rcu|page allocation failure|I/O error] in recent dmesg.
93+ [PASS] 2025-09-02 05:08:39 - [Encode1] PASS (1/1 ok)
94+ [INFO] 2025-09-02 05:08:55 - No relevant, non-benign errors for modules [oom|memory|BUG|hung task|soft lockup|hard lockup|rcu|page allocation failure|I/O error] in recent dmesg.
95+ [PASS] 2025-09-02 05:08:55 - [Decode2] PASS (1/1 ok)
96+ [INFO] 2025-09-02 05:08:57 - No relevant, non-benign errors for modules [oom|memory|BUG|hung task|soft lockup|hard lockup|rcu|page allocation failure|I/O error] in recent dmesg.
97+ [PASS] 2025-09-02 05:08:57 - [Encode2] PASS (1/1 ok)
98+ [INFO] 2025-09-02 05:09:01 - No relevant, non-benign errors for modules [oom|memory|BUG|hung task|soft lockup|hard lockup|rcu|page allocation failure|I/O error] in recent dmesg.
99+ [PASS] 2025-09-02 05:09:01 - [Decode3] PASS (1/1 ok)
100+ [INFO] 2025-09-02 05:09:01 - Summary: total=5 pass=5 fail=0 skip=0
101+ [PASS] 2025-09-02 05:09:01 - Video_V4L2_Runner: PASS
102+ [PASS] 2025-09-02 05:09:01 - Video_V4L2_Runner passed
103+
104+ [INFO] 2025-09-02 05:09:01 - ========== Test Summary ==========
105+ PASSED:
106+ Video_V4L2_Runner
107+
108+ FAILED:
109+ None
110+
111+ SKIPPED:
112+ None
113+ [INFO] 2025-09-02 05:09:01 - ==================================
71114```
72- 3 . Results will be available in the ` Runner/suites/Multimedia/Video/ ` directory under each usecase folder.
115+
116+ 4 . Results will be available in the ` Runner/suites/Multimedia/Video/Video_V4L2_Runner ` directory.
117+
118+ ## Common Options
119+
120+ | Option | Description |
121+ | --------| -------------|
122+
123+ | `--extract-input-clips true| false` | Auto-fetch missing clips (default: true) |
124+ | `--stack auto| upstream| downstream| base| overlay| up| down` | Select video stack |
125+ | `--platform lemans| monaco| kodiak` | Specify platform for validation |
126+ | ` --downstream-fw PATH ` | Path to downstream firmware (Kodiak-specific) |
127+ | ` --force ` | Force stack switch or firmware override |
128+ | ` --verbose ` | Enable verbose logging |
129+ | ` --config path.json ` | Run a specific config file |
130+ | ` --dir DIR ` | Directory to search for configs |
131+ | ` --pattern GLOB ` | Filter configs by glob pattern |
132+ | ` --timeout S ` | Timeout per test (default: 60s) |
133+ | ` --strict ` | Fail on critical dmesg errors |
134+ | ` --no-dmesg ` | Disable dmesg scanning |
135+ | ` --max N ` | Run at most N tests |
136+ | ` --stop-on-fail ` | Stop on first failure |
137+ | ` --loglevel N ` | Set log level for ` iris_v4l2_test ` |
138+ | ` --repeat N ` | Repeat each test N times |
139+ | ` --repeat-delay S ` | Delay between repeats |
140+ | `--repeat-policy | all or any |
141+ | ` --junit FILE ` | Output JUnit XML to file |
142+ | ` --dry-run ` | Show commands without executing |
143+
73144
74145## Notes
75146
76- - The script does not take any arguments .
147+ - The script auto-detects encode/decode mode based on config filename .
77148- It validates the presence of required libraries before executing tests.
78- - If any critical tool is missing, the script exits with an error message.
149+ - If any critical tool is missing, the script exits with an error message.
150+ - Missing input clips are fetched from:
151+ https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/IRIS-Video-Files-v1.0/video_clips_iris.tar.gz
152+
153+ ## License
154+
155+ SPDX-License-Identifier: BSD-3-Clause-Clear
156+ (C) Qualcomm Technologies, Inc. and/or its subsidiaries.
0 commit comments