summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-09-12 22:27:32 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-09-13 00:39:16 +0300
commit11c8254bff29c0da0a41f4d40ca4f0795c52745f (patch)
tree3feb31cff03b7f922994bc23e7af8991d99bb0e1
parentf0d6dfc637194a98861e5565556144076fe1b789 (diff)
vsp-lib: Use both input and output formats to name frame files
Tests can run with a single output format and different input formats. If multiple failures are recorded the frame files overwrite each others. Fix this by naming them with both the input and output formats. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xscripts/vsp-lib.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
index 40b6144..d9f0f7d 100755
--- a/scripts/vsp-lib.sh
+++ b/scripts/vsp-lib.sh
@@ -220,10 +220,12 @@ compare_frame_fuzzy() {
compare_frames() {
local args=$*
- local format=$__vsp_wpf_format
+ local in_format=$__vsp_rpf_format
+ local out_format=$__vsp_wpf_format
local wpf=$__vsp_wpf_index
- local fmt=$(echo $format | tr '[:upper:]' '[:lower:]')
+ local in_fmt=$(echo $in_format | tr '[:upper:]' '[:lower:]')
+ local out_fmt=$(echo $out_format | tr '[:upper:]' '[:lower:]')
local size=$(vsp1_entity_get_size wpf.$wpf 1)
local method=exact
@@ -231,16 +233,16 @@ compare_frames() {
method=fuzzy
fi
- reference_frame ${frames_dir}ref-frame.bin $format $size $args
+ reference_frame ${frames_dir}ref-frame.bin $out_format $size $args
local result="pass"
local params=${args// /-}
params=${params:+-$params}
params=${params//\//_}
- params=$fmt-$size$params
+ params=$in_fmt-$out_fmt-$size$params
for frame in ${frames_dir}frame-*.bin ; do
- (compare_frame_$method $format $size $frame ${frames_dir}ref-frame.bin) || {
+ (compare_frame_$method $out_format $size $frame ${frames_dir}ref-frame.bin) || {
mv $frame ${0/.sh/}-$(basename ${frame/.bin/-$params.bin}) ;
result="fail"
}