Debian Codegraph @

src/testpattern/run-testpattern-1.test.in

raw
1 #!@BASHREAL@
2
3 # Driver for test pattern generator
4 #
5 # Copyright 2004-2008 Robert Krawitz ([email protected]) and other
6 # members of the Gutenprint project.
7 #
8 # This program is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by the Free
10 # Software Foundation; either version 2 of the License, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 # for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21 if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then
22 redir="${STP_TEST_LOG_PREFIX}${0##*/}_$$.log"
23 if [[ -n $BUILD_VERBOSE ]] ; then
24 exec > >(tee -a "$redir" >&3)
25 else
26 exec 1>>"$redir"
27 fi
28 exec 2>&1
29 fi
30
31 [[ -n $STP_TEST_COMPONENTS && $STP_TEST_COMPONENTS != '*testpattern*' ]] && exit 77
32
33 if [[ $STP_TEST_PROFILE != full && -n $STP_TEST_SUITE ]] ; then
34 exit 77
35 fi
36
37 if [[ -n $STP_TEST_DEBUG ]] ; then
38 echo "Would run $0 $*"
39 exit 0
40 fi
41
42 if [[ -z $srcdir || $srcdir = "." ]] ; then
43 sdir=$(pwd)
44 elif grep -q '^/' <<< "$srcdir" ; then
45 sdir="$srcdir"
46 else
47 sdir="$(pwd)/$srcdir"
48 fi
49
50 if [ -z "$STP_DATA_PATH" ] ; then
51 STP_DATA_PATH="$sdir/../xml"
52 export STP_DATA_PATH
53 fi
54
55 if [ -z "$STP_MODULE_PATH" ] ; then
56 STP_MODULE_PATH="$sdir/../main:$sdir/../main/.libs"
57 export STP_MODULE_PATH
58 fi
59
60 valgrind=0
61 valopts=''
62 extra=''
63 dontrun=
64 output=
65
66 set_opt() {
67 opt=$(echo "$1" | awk -F= '{print $1}')
68 val=$(echo "$1" | awk -F= '{print $2}')
69 extra="$(printf '%s\nparameter \"%s\" \"%s\";' "$extra" "$opt" "$val")"
70 }
71
72 set_message() {
73 the_message="$(printf '%s\nmessage \"%s\";' "$the_message" "$*")"
74 }
75
76 usage() {
77 echo "Usage: run-testpattern [-v|--valgrind]"
78 echo " [-p|--parameter parameter=value]"
79 echo " [-n|--dontrun]"
80 echo " [-O|--output]"
81 echo " [--] [printers...]"
82 exit 0;
83 }
84
85 print_command='cat'
86
87 set_args() {
88 while true ; do
89 case "$1" in
90 -h*|--h*) usage ;;
91 -v|--valgrind) valopts='--tool=memcheck' ; valgrind=$((valgrind+1)) ;;
92 -c|--cachegrind) valopts='--skin=cachegrind'; valgrind=4 ;;
93 -g|--gdb-attach) valopts='--vgdb=yes' ;;
94 -p|--parameter) shift; set_opt "$1" ;;
95 -n|--dontrun) dontrun=1 ;;
96 -O|--output) shift; output="$1" ;;
97 -o|--one) print_command=run_testpattern; dontrun=1 ;;
98 --) shift; args="$*"; return ;;
99 *) return ;;
100 esac
101 shift
102 done
103 }
104
105 print_one_testpattern() {
106 printer=$1
107 mode=$2
108 bits=$3
109 inktype=$4
110 correction=$5
111 printingmode=$6
112 shift
113 shift
114 shift
115 shift
116 shift
117 shift
118 stuff="$*"
119 cat <<EOF
120 printer "$printer";
121 $stuff
122 parameter "InkType" "$inktype";
123 parameter "ColorCorrection" "$correction";
124 parameter "PrintingMode" "$printingmode";
125 parameter "DitherAlgorithm" "VeryFast";
126 hsize 0.1;
127 vsize 0.1;
128 left 0.15;
129 top 0.15;
130 blackline 0;
131 steps 16;
132 mode $mode $bits;
133 pattern 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 ;
134 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0;
135 pattern 1.0 1.0 1.0 1.0 1.0 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pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.25 1.0 0.0 0.0 1.0;
177 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.1 1.0 0.0 0.0 1.0;
178 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.1 1.0 0.0 0.0 1.0;
179 end;
180 EOF
181 }
182
183 print_one_raw_testpattern() {
184 printer=$1
185 mode=$2
186 bits=$3
187 inktype=$4
188 correction=$5
189 printingmode=$6
190 shift
191 shift
192 shift
193 shift
194 shift
195 shift
196 stuff="$*"
197 cat <<EOF
198 printer "$printer";
199 $stuff
200 parameter "InkType" "$inktype";
201 parameter "ColorCorrection" "$correction";
202 parameter "PrintingMode" "$printingmode";
203 page_size 256 256;
204 blackline 0;
205 steps 256;
206 mode $mode $bits;
207 pattern 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 ;
208 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0;
209 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0;
210 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0;
211 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0;
212 pattern 0.0 0.0 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0;
213 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 -2.0 1.0 0.0 -2.0 1.0 0.0 -2.0 1.0;
214 pattern 1.0 1.0 1.0 1.0 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 0.75 1.0 0.0 0.75 1.0;
228 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.75 1.0 0.0 0.75 1.0;
229 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0;
230 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0;
231 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.25 1.0 0.0 0.25 1.0;
232 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.25 1.0 0.0 0.25 1.0;
233 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.0 1.0 0.0 0.1 1.0 0.0 0.1 1.0;
234 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.0 1.0 0.0 0.1 1.0 0.0 0.1 1.0;
235 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0;
236 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.75 1.0;
237 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.75 1.0;
238 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0;
239 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0;
240 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.25 1.0;
241 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.25 1.0;
242 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.0 1.0 0.0 0.1 1.0;
243 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.0 1.0 0.0 0.1 1.0;
244 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0;
245 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.75 1.0 0.0 0.0 1.0;
246 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.75 1.0 0.0 0.0 1.0;
247 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0;
248 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0;
249 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.25 1.0 0.0 0.0 1.0;
250 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.25 1.0 0.0 0.0 1.0;
251 pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.1 1.0 0.0 0.0 1.0;
252 pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.1 1.0 0.0 0.0 1.0;
253 end;
254 EOF
255 }
256
257 run_testpattern() {
258 suppress=-n
259 if [ -n "$output" ] ; then
260 suppress=''
261 fi
262 case "$valgrind" in
263 1) libtool --mode=execute valgrind $valopts -q --num-callers=100 --leak-check=yes --error-limit=no ./testpattern $suppress ;;
264 2) libtool --mode=execute valgrind $valopts --num-callers=100 --leak-resolution=high --leak-check=yes --error-limit=no ./testpattern $suppress ;;
265 3) libtool --mode=execute valgrind $valopts --error-limit=no --num-callers=100 --show-reachable=yes --leak-resolution=high --leak-check=yes ./testpattern $suppress ;;
266 4) libtool --mode=execute valgrind $valopts ./testpattern $suppress ;;
267 *) ./testpattern $suppress ;;
268 esac
269 (( $? != 0 )) && return 1
270 return 0
271 }
272
273 set_args $(getopt hgvp:ncoO: "$@")
274
275 StandardBitDepths="8 16"
276 StandardModes="rgb kcmy cmyk cmy gray white"
277 StandardColorCorrections="None Density Desaturated Accurate Bright Uncorrected Threshold Raw Predithered"
278 StandardInkTypes="CMYKRB CMYK RGB"
279 StandardPrintingModes="BW Color"
280
281 RawBitDepths="8 16"
282 #RawTypes="raw-data-8 raw-data-16"
283 RawModes="rgb kcmy cmyk cmy gray white"
284 RawColorCorrections="None Density Desaturated Accurate Bright Uncorrected Threshold Raw Predithered"
285 RawInkTypes="CMYK RGB CMY KCMY RGBGray CMYGray"
286 RawPrintingModes="BW Color"
287
288 the_message=''
289
290 if [[ -z $dontrun && -n $output && ! -d $output ]] ; then
291 mkdir "$output" || {
292 echo "Cannot create directory '$output'"
293 exit 1
294 }
295 fi
296
297 test_rotor=${STP_TEST_ROTOR:-0}
298 test_rotor_circumference=${STP_TEST_ROTOR_CIRCUMFERENCE:-1}
299 test_count=-1
300
301 print_all_testpatterns() {
302 for a in $RawPrintingModes ; do
303 for b in $RawInkTypes ; do
304 for c in $RawColorCorrections ; do
305 for d in $RawModes ; do
306 for e in $RawBitDepths ; do
307 test_count=$((test_count+1))
308 (( test_count % test_rotor_circumference != test_rotor )) && continue
309 set_message "Raw $a $b $c $d $e"
310 if [[ -n $output ]] ; then
311 outstuff="$(printf '\n%s\n' \"output \\\""$output"/raw-data-8_"$a"_"$b"_"$c"_"$d"_"$e"\\\";\")"
312 fi
313 print_one_raw_testpattern "raw-data-8" "$d" "$e" "$b" "$c" "$a" "$extra" "$the_message" "$outstuff"| $print_command
314 the_message=""
315 done
316 done
317 done
318 done
319 done
320 for a in $StandardPrintingModes ; do
321 for b in $StandardInkTypes ; do
322 for c in $StandardColorCorrections ; do
323 for d in $StandardModes ; do
324 for e in $StandardBitDepths ; do
325 test_count=$((test_count+1))
326 (( test_count % test_rotor_circumference != test_rotor )) && continue
327 set_message "R800 $a $b $c $d $e"
328 if [[ -n $output ]] ; then
329 outstuff="$(printf '\n%s\n' \"output \\\""$output"/raw-data-8_"$a"_"$b"_"$c"_"$d"_"$e"\\\";\")"
330 fi
331 print_one_testpattern "escp2-r800" "$d" "$e" "$b" "$c" "$a" "$extra" "$the_message" "$outstuff" | $print_command
332 the_message=""
333 done
334 done
335 done
336 done
337 done
338 for a in $StandardColorCorrections ; do
339 for b in $StandardBitDepths ; do
340 test_count=$((test_count+1))
341 (( test_count % test_rotor_circumference != test_rotor )) && continue
342 set_message "R800 Extended Color 8 CMYKRB $a $b"
343 if [ -n "$output" ] ; then
344 outstuff="$(printf '\n%s\n' \"output \\\""$output"/escp2-r800_"$b"_CMYKRB_"$a"_Color\\\";\")"
345 fi
346 print_one_testpattern "escp2-r800" "extended 8" "$b" CMYKRB "$a" Color "$extra" "$the_message" "$outstuff" | $print_command
347 the_message=""
348 done
349 done
350 }
351
352 if [ -z "$dontrun" ] ; then
353 print_all_testpatterns | run_testpattern 2>&1
354 else
355 print_all_testpatterns
356 fi
357
358 exit $?