From 11c8254bff29c0da0a41f4d40ca4f0795c52745f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Sep 2016 22:27:32 +0300 Subject: 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 --- scripts/vsp-lib.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/vsp-lib.sh') 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" } -- cgit v1.2.3