@@ -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,14 @@ 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
4051```
4152
4253## Usage
@@ -49,30 +60,85 @@ Runner/
4960
5061Run a specific test using:
5162---
52- Quick Example
63+ Quick Example:
5364```
5465git clone <this-repo>
5566cd <this-repo>
5667scp -r Runner user@target_device_ip:<Path in device>
5768ssh user@target_device_ip
58- cd <Path in device>/Runner && ./run-test.sh iris_v4l2_video_encode
69+ cd <Path in device>/Runner && ./run-test.sh Video_V4L2_Runner
5970```
6071Sample output:
6172```
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----------------------------
73+ sh-5.2# ./run-test.sh Video_V4L2_Runner
74+ [Executing test case: Video_V4L2_Runner] 2025-09-02 05:08:36 -
75+ [INFO] 2025-09-02 05:08:36 - ----------------------------------------------------------------------
76+ [INFO] 2025-09-02 05:08:36 - ------------------ Starting Video_V4L2_Runner (generic runner) ----------------
77+ [INFO] 2025-09-02 05:08:36 - === Initialization ===
78+ [INFO] 2025-09-02 05:08:36 - TIMEOUT=60s STRICT=0 DMESG_SCAN=1 SUCCESS_RE=SUCCESS
79+ [INFO] 2025-09-02 05:08:36 - LOGLEVEL=15
80+ [INFO] 2025-09-02 05:08:36 - REPEAT=1 REPEAT_DELAY=0s REPEAT_POLICY=all
81+ [INFO] 2025-09-02 05:08:36 - No config argument passed, searching for JSON files in /var/Runner/suites/Multimedia/Video/
82+ [INFO] 2025-09-02 05:08:36 - Configs to run:
83+ - /var/Runner/suites/Multimedia/Video/Video_V4L2_H264_Decode/h264Decoder.json
84+ - /var/Runner/suites/Multimedia/Video/Video_V4L2_H264_Encode/h264Encoder.json
85+ - /var/Runner/suites/Multimedia/Video/Video_V4L2_H265_Decode/h265Decoder.json
86+ - /var/Runner/suites/Multimedia/Video/Video_V4L2_H265_Encode/h265Encoder.json
87+ - /var/Runner/suites/Multimedia/Video/Video_V4L2_VP9_Decode/vp9Decoder.json
88+ [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.
89+ [PASS] 2025-09-02 05:08:37 - [Decode1] PASS (1/1 ok)
90+ [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.
91+ [PASS] 2025-09-02 05:08:39 - [Encode1] PASS (1/1 ok)
92+ [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.
93+ [PASS] 2025-09-02 05:08:55 - [Decode2] PASS (1/1 ok)
94+ [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.
95+ [PASS] 2025-09-02 05:08:57 - [Encode2] PASS (1/1 ok)
96+ [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.
97+ [PASS] 2025-09-02 05:09:01 - [Decode3] PASS (1/1 ok)
98+ [INFO] 2025-09-02 05:09:01 - Summary: total=5 pass=5 fail=0 skip=0
99+ [PASS] 2025-09-02 05:09:01 - Video_V4L2_Runner: PASS
100+ [PASS] 2025-09-02 05:09:01 - Video_V4L2_Runner passed
101+
102+ [INFO] 2025-09-02 05:09:01 - ========== Test Summary ==========
103+ PASSED:
104+ Video_V4L2_Runner
105+
106+ FAILED:
107+ None
108+
109+ SKIPPED:
110+ None
111+ [INFO] 2025-09-02 05:09:01 - ==================================
71112```
72- 3 . Results will be available in the ` Runner/suites/Multimedia/Video/ ` directory under each usecase folder.
113+
114+ 4 . Results will be available in the ` Runner/suites/Multimedia/Video/Video_V4L2_Runner ` directory.
115+
116+ ## Common Options
117+
118+ - Below options are currently supported if you run video test script ` Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh `
119+
120+ | Option | Description |
121+ | ---| ---|
122+ | ` --config path.json ` | Run a specific config file |
123+ | ` --dir DIR ` | Directory to search for configs |
124+ | ` --pattern GLOB ` | Filter configs by glob pattern |
125+ | ` --timeout S ` | Timeout per test (default: 60s) |
126+ | ` --strict ` | Fail on critical dmesg errors |
127+ | ` --no-dmesg ` | Disable dmesg scanning |
128+ | ` --max N ` | Run at most N tests |
129+ | ` --stop-on-fail ` | Stop on first failure |
130+ | ` --loglevel N ` | Set log level for ` iris_v4l2_test ` |
131+ | ` --repeat N ` | Repeat each test N times |
132+ | ` --repeat-delay S ` | Delay between repeats |
133+ | `--repeat-policy | all or any |
134+ | ` --junit FILE ` | Output JUnit XML to file |
135+ | ` --dry-run ` | Show commands without executing |
136+
73137
74138## Notes
75139
76- - The script does not take any arguments .
140+ - The script auto-detects encode/decode mode based on config filename .
77141- It validates the presence of required libraries before executing tests.
78- - If any critical tool is missing, the script exits with an error message.
142+ - If any critical tool is missing, the script exits with an error message.
143+ - Missing input clips are fetched from:
144+ https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/IRIS-Video-Files-v1.0/video_clips_iris.tar.gz
0 commit comments