summaryrefslogtreecommitdiff
path: root/tests/vsp-unit-test-0009.sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-05-27 11:52:15 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-19 15:26:01 +0300
commitf9d8f5e0578f88416af5af98e9bb46a05804e385 (patch)
tree8503143a6fdd74e6f3528d272f689e1382a8fb15 /tests/vsp-unit-test-0009.sh
parent6bc72f272520323e333d52b6cd09365238d7983e (diff)
tests: Split RPF->WPF test
The VSP instance that supports the largest number of RPF might not be the same as the one that supports the largest number of WPF. To maximize test coverage, split the test into RPF and WPF tests that can use different VSP instances. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests/vsp-unit-test-0009.sh')
-rwxr-xr-xtests/vsp-unit-test-0009.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/vsp-unit-test-0009.sh b/tests/vsp-unit-test-0009.sh
new file mode 100755
index 0000000..b95b06b
--- /dev/null
+++ b/tests/vsp-unit-test-0009.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+#
+# Test RPF -> WPF with all WPF instances in sequence. The format doesn't matter
+# much, use RGB24 to simplify frame comparison.
+#
+
+source vsp-lib.sh
+
+features="rpf.0 wpf.0 wpf.1"
+optional_features="wpf.1 wpf.2 wpf.3"
+format=RGB24
+
+test_wpf() {
+ wpf=$1
+
+ test_start "WPF.$wpf"
+
+ pipe_configure rpf-wpf 0 $wpf
+ format_configure rpf-wpf 0 $wpf $format 1024x768 $format
+
+ $vsp_runner $mdev input 0 $format &
+ $vsp_runner $mdev output $wpf $format
+
+ result=$(compare_frames exact)
+
+ test_complete $result
+}
+
+test_main() {
+ num_wpfs=$(vsp1_count_wpfs)
+
+ for wpf in `seq 0 1 $((num_wpfs-1))` ; do
+ test_wpf $wpf
+ done
+}
+
+test_init $0 "$features" "$optional_features"
+test_run