Skip to contentSkip to conversation

tests: Provide copy test to validate 1xN streams

PATCH New Kieran Bingham 1 participant 1 message Aug 31, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests: Provide copy test to validate 1xN streams

Validate that a 1xN stream can be read through the RPF and written through the WPF.

The test framework does not currently support processing images where the stride does not match the output width - so the testing is currently limited to testing only the vertical direction in this aspect.

---
 tests/vsp-unit-test-0025.sh | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100755 tests/vsp-unit-test-0025.sh
tests/vsp-unit-test-0025.sh new file +45 -0
new file mode 100755
index 000000000000..57a1fac6e369
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+#
+# Test pipelines which have a single pixel dimension. Use a RPF -> WPF
+# pipeline with identical input and output formats to generate our output.
+#
+
+. ./vsp-lib.sh
+
+features="rpf.0 uds wpf.0"
+formats="RGB24 ARGB32"
+
+# Input is directly copied to the output. No change in format or size.
+test_copy() {
+	local format=$1
+	local insize=$2
+
+	test_start "copying $insize in $format"
+
+	pipe_configure rpf-wpf 0 0
+	format_configure rpf-wpf 0 0 $format $insize $format
+
+	vsp_runner rpf.0 &
+	vsp_runner wpf.0
+
+	local result=$(compare_frames)
+
+	test_complete $result
+}
+
+test_main() {
+	local format
+
+	for format in $formats ; do
+		test_copy $format 1024x768
+		test_copy $format 128x128
+		test_copy $format 128x1
+
+		# Skipped : Test framework does not yet support strides != width
+		#test_copy $format 1x128
+	done
+}
+
+test_init $0 "$features"
+test_run
Signature · 1 line
2.17.1