| 1 |
#!/usr/bin/bash |
| 2 |
|
| 3 |
# Don't want to run this at all as part of automated test |
| 4 |
[ -n "$STP_TEST_SUITE" ] && exit 77 |
| 5 |
|
| 6 |
if [[ -n "$STP_TEST_LOG_PREFIX" ]] ; then |
| 7 |
redir="${STP_TEST_LOG_PREFIX}${0##*/}_$$.log" |
| 8 |
if [[ -n $BUILD_VERBOSE ]] ; then |
| 9 |
exec > >(tee -a "$redir" >&3) |
| 10 |
else |
| 11 |
exec 1>>"$redir" |
| 12 |
fi |
| 13 |
exec 2>&1 |
| 14 |
fi |
| 15 |
|
| 16 |
if [[ -z $srcdir || $srcdir = "." ]] ; then |
| 17 |
sdir=$(pwd) |
| 18 |
elif grep -q '^/' <<< "$srcdir" ; then |
| 19 |
sdir="$srcdir" |
| 20 |
else |
| 21 |
sdir="$(pwd)/$srcdir" |
| 22 |
fi |
| 23 |
|
| 24 |
if [ -z "$STP_DATA_PATH" ] ; then |
| 25 |
STP_DATA_PATH="$sdir/../src/xml" |
| 26 |
export STP_DATA_PATH |
| 27 |
fi |
| 28 |
|
| 29 |
if [ -z "$STP_MODULE_PATH" ] ; then |
| 30 |
STP_MODULE_PATH="$sdir/../src/main:$sdir/../src/main/.libs" |
| 31 |
export STP_MODULE_PATH |
| 32 |
fi |
| 33 |
|
| 34 |
passes='1,1,1 2,1,1 1,2,1 1,2,2 1,4,1 4,1,1 1,8,1 1,16,1 4,2,1 4,4,1 4,8,1 4,16,1 2,2,1 2,4,1 2,8,1 2,16,1 1,4,2 1,8,2 1,16,2 2,2,2 2,4,2 2,8,2 2,16,2 8,1,1 4,4,2 4,8,2 8,2,1 8,4,1 8,8,1 16,1,1 16,2,1 16,4,1' |
| 35 |
|
| 36 |
# All numbers of jets used by any printer. |
| 37 |
jets='1 2 4 8 15 16 20 21 24 29 32 42 47 48 59 60 64 90 96 128 144 180 192 208 358 360 384' |
| 38 |
|
| 39 |
# All nozzle separations used by any printer at any resolution. |
| 40 |
separations='1 2 3 4 6 8 12 16 24' |
| 41 |
|
| 42 |
# Weave strategies |
| 43 |
strategies='0 1 2 3 4' |
| 44 |
# Strategy 5 is currently broken |
| 45 |
#strategies='5' |
| 46 |
|
| 47 |
# Color head arrangement (for offset-head printers such as the Epson C80) |
| 48 |
arrangements='0 1 2 3' |
| 49 |
|
| 50 |
# Set to the largest possible multiple of the number of heads and |
| 51 |
# the nozzle separation. At present, the WorkForce 40 has 384 heads spaced |
| 52 |
# 1/360" apart, with a maximum resolution of 2880x2880. There's no |
| 53 |
# point right now in testing anything higher than this, and it's very |
| 54 |
# time consuming. |
| 55 |
head_limit=3072 |
| 56 |
|
| 57 |
if [ $# -eq 0 ] ; then |
| 58 |
QUIET=1 |
| 59 |
export QUIET |
| 60 |
fi |
| 61 |
|
| 62 |
# For valgrind use, use |
| 63 |
# valgrind --partial-loads-ok=no --num-callers=50 --leak-check=yes |
| 64 |
# |
| 65 |
# and use these suppressions: |
| 66 |
# |
| 67 |
#{ |
| 68 |
# gettext |
| 69 |
# Addr4 |
| 70 |
# fun:__dcigettext |
| 71 |
# fun:__dcgettext |
| 72 |
#} |
| 73 |
# |
| 74 |
#{ |
| 75 |
# nl_load_locale |
| 76 |
# Addr4 |
| 77 |
# fun:_nl_load_locale |
| 78 |
# fun:_nl_find_locale |
| 79 |
# fun:setlocale |
| 80 |
#} |
| 81 |
# |
| 82 |
#{ |
| 83 |
# setlocale |
| 84 |
# Addr4 |
| 85 |
# fun:setlocale |
| 86 |
#} |
| 87 |
# |
| 88 |
#{ |
| 89 |
# c_strlen |
| 90 |
# Addr4 |
| 91 |
# fun:c_strlen |
| 92 |
#} |
| 93 |
|
| 94 |
( |
| 95 |
for strategy in $strategies ; do |
| 96 |
for jet in $jets ; do |
| 97 |
for sep in $separations ; do |
| 98 |
start=$((jet * sep)) |
| 99 |
if (( start < head_limit)) ; then |
| 100 |
rows=$((start * 5)) |
| 101 |
(( rows < 200 )) && rows=200 |
| 102 |
s1=$((start - 1)) |
| 103 |
for f in 0 41 "$start" "$s1" ; do |
| 104 |
end=$((rows + f + start)) |
| 105 |
end1=$((rows + f)) |
| 106 |
end2=$((rows + f + 35)) |
| 107 |
for g in $end $end1 $end2 ; do |
| 108 |
for pass in $passes ; do |
| 109 |
for arrangement in $arrangements; do |
| 110 |
echo "$jet $sep $pass $rows $f $g $arrangement $strategy" |
| 111 |
done |
| 112 |
done |
| 113 |
done |
| 114 |
done |
| 115 |
fi |
| 116 |
done |
| 117 |
done |
| 118 |
done) | sed 's/,/ /g' | ./escp2-weavetest |