File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,13 @@ magick_compare() {
1414
1515 requested_psnr=${4-$requested_psnr_dfl }
1616 # shellcheck disable=SC2086 # intentional
17- psnr=$( compare -metric PSNR ${3-} " ${1?} " " ${2?} " null: 2>&1 |
18- cut -d\ -f1 || true)
17+ if output=$( compare -metric PSNR ${3-} " ${1?} " " ${2?} " null: 2>&1 )
18+ then :
19+ elif [ " $? " -ne 1 ]; then # RC 1 is also ok for IM compare
20+ echo " compare ERROR: $output "
21+ exit 1
22+ fi
23+ psnr=$( echo " $output " | cut -d\ -f1)
1924 echo IM PSNR: " $psnr (required $requested_psnr )"
2025 # TODO TOREMOVE if not needed (supposing it is IM bug, not feature)
2126 if expr " $psnr " : ' [0-9][0-9.]*$' > /dev/null &&
Original file line number Diff line number Diff line change @@ -150,6 +150,17 @@ test_random_psnr() {
150150 done
151151}
152152
153+ test_cpu_huffman_reconf_df3788e87_20260320 () {
154+ test_dir=testdata-test_cpu_huffman_reconf_df3788e87_20260320
155+ mkdir $test_dir && cd $test_dir
156+ " $GPUJPEG " -r 0 50x50.tst 50.jpg
157+ " $GPUJPEG " -r 0 60x60.tst 60.jpg
158+ " $GPUJPEG " -d 60.jpg 60.pnm 50.jpg 50.pnm
159+ magick_compare 50.jpg 50.pnm
160+ cd .. && rm $test_dir /* && rmdir $test_dir
161+ }
162+
163+ tests="
153164test_commit_b620be2
154165test_different_sizes
155166test_fix_decode_outside_pinned_AND_fix_huff_buf_partially_not_cleared
@@ -159,4 +170,10 @@ test_nonexistent
159170test_out_ext_XXX
160171test_pam_pnm_y4m
161172test_random_psnr
173+ test_cpu_huffman_reconf_df3788e87_20260320
174+ "
162175
176+ for n in $tests ; do
177+ printf " \n\n\nRunning %s...\n" " $n "
178+ " $n "
179+ done
You can’t perform that action at this time.
0 commit comments