-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add runtime test using h26forge bitstreams
Test is v4l2slh264dec can safely decode the bitstreams generated by h26forge. Signed-off-by: Benjamin Gaignard <[email protected]>
- Loading branch information
Benjamin Gaignard
committed
Jan 9, 2025
1 parent
0b3751e
commit 2ff6aab
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
config/rootfs/debos/overlays/h26forge/usr/bin/h26forge-parser.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2025 Collabora Limited | ||
# Author: Benjamin Gaignard <[email protected]> | ||
# | ||
# This module is free software; you can redistribute it and/or modify it under | ||
# the terms of the GNU Lesser General Public License as published by the Free | ||
# Software Foundation; either version 2.1 of the License, or (at your option) | ||
# any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
# details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this library; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
set -e | ||
|
||
if [ "$KERNELCI_LAVA" = "y" ]; then | ||
alias test-result='lava-test-case' | ||
alias test-exception='lava-test-raise' | ||
else | ||
alias test-result='echo' | ||
alias test-exception='echo' | ||
fi | ||
|
||
if ! command -v gst-inspect-1.0 >/dev/null; then | ||
echo "gst-inspect-1.0 not found. Please install it to proceed." | ||
test-result h26forge-debian --result skip | ||
exit 0 | ||
fi | ||
|
||
# Check if v4l2slh264dec element exist | ||
if command -v gst-inspect-1.0 --exists v4l2slh264dec>/dev/null; then | ||
echo "v4l2slh264dec element is missing. Skipping the test" | ||
test-result h26forge-debian --result skip | ||
exit 0 | ||
fi | ||
|
||
if [ ! -d /opt/h26forge/test_videos/ ]; then | ||
echo "bitstreams test directory missing. Skipping the test" | ||
test-result h26forge-debian --result skip | ||
exit 0 | ||
fi | ||
|
||
cd /opt/h26forge/test_videos/ | ||
|
||
for i in $(seq -f "%04g" 0 99); do | ||
if command -v gst-launch-1.0 filesrc location=video$i.264.mp4 ! parsebin ! v4l2slh264dec ! fakesink>/dev/null; then | ||
test-result h26forge-debian --result fail | ||
exit 1 | ||
fi | ||
done | ||
|
||
test-result h26forge-debian --result pass | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{# This test verifies if h26forge generate bitstream | ||
# do not make h264 stateless decoder crash basic functionality: | ||
-#} | ||
- test: | ||
timeout: | ||
minutes: {{ job_timeout|default('15') }} | ||
definitions: | ||
- repository: | ||
metadata: | ||
format: Lava-Test Test Definition 1.0 | ||
name: {{ node.name }} | ||
description: "h26forge test plan" | ||
os: | ||
- debian | ||
scope: | ||
- functional | ||
run: | ||
steps: | ||
- KERNELCI_LAVA=y /usr/bin/h26forge-parser.sh | ||
|
||
from: inline | ||
name: {{ node.name }} | ||
path: inline/{{ node.name }}.yaml |