improvements to test to help osx
This commit is contained in:
parent
da007b22e6
commit
932a16b615
@ -7,8 +7,10 @@ EXTRA_DIST = \
|
||||
test_seq.sh \
|
||||
test_thumbnail.sh \
|
||||
test_threading.sh \
|
||||
test_python.sh
|
||||
test_arithmetic.py \
|
||||
test_colour.py \
|
||||
test_convolution.py \
|
||||
test_conversion.py
|
||||
|
||||
# don't run test_thumbnail.sh by default, it takes ages
|
||||
@ -19,8 +21,7 @@ TESTS = \
|
||||
test_cli.sh \
|
||||
test_formats.sh \
|
||||
test_seq.sh \
|
||||
test_threading.sh \
|
||||
test_python.sh
|
||||
test_threading.sh
|
||||
|
||||
clean-local:
|
||||
-rm -rf tmp
|
||||
|
@ -34,7 +34,7 @@ test_rotate() {
|
||||
im=$1
|
||||
inter=$2
|
||||
|
||||
echo -n "testing $inter ... "
|
||||
printf "testing $inter ... "
|
||||
|
||||
# 90 degree clockwise rotate
|
||||
trn="0 1 1 0"
|
||||
|
@ -70,7 +70,7 @@ test_format() {
|
||||
threshold=$3
|
||||
mode=$4
|
||||
|
||||
echo -n "testing $(basename $in) $format$mode ... "
|
||||
printf "testing $(basename $in) $format$mode ... "
|
||||
|
||||
save_load $in $format $mode
|
||||
test_difference $in $tmp/back.v $threshold
|
||||
@ -84,7 +84,7 @@ test_format() {
|
||||
test_rad() {
|
||||
in=$1
|
||||
|
||||
echo -n "testing $(basename $in) hdr ... "
|
||||
printf "testing $(basename $in) hdr ... "
|
||||
|
||||
save_load $in hdr
|
||||
|
||||
@ -101,7 +101,7 @@ test_rad() {
|
||||
test_raw() {
|
||||
in=$1
|
||||
|
||||
echo -n "testing $(basename $in) raw ... "
|
||||
printf "testing $(basename $in) raw ... "
|
||||
|
||||
vips copy $in $tmp/before.v
|
||||
width=$(vipsheader -f width $tmp/before.v)
|
||||
@ -123,7 +123,7 @@ test_loader() {
|
||||
in=$2
|
||||
format=$3
|
||||
|
||||
echo -n "testing $(basename $in) $format ... "
|
||||
printf "testing $(basename $in) $format ... "
|
||||
|
||||
vips copy $ref $tmp/before.v
|
||||
vips copy $in $tmp/after.v
|
||||
@ -135,14 +135,14 @@ test_loader() {
|
||||
|
||||
test_format $image v 0
|
||||
test_format $image tif 0
|
||||
test_format $image tif 70 [compression=jpeg]
|
||||
test_format $image tif 90 [compression=jpeg]
|
||||
test_format $image tif 0 [compression=deflate]
|
||||
test_format $image tif 0 [compression=packbits]
|
||||
test_format $image tif 70 [compression=jpeg,tile]
|
||||
test_format $image tif 70 [compression=jpeg,tile,pyramid]
|
||||
test_format $image tif 90 [compression=jpeg,tile]
|
||||
test_format $image tif 90 [compression=jpeg,tile,pyramid]
|
||||
test_format $image png 0
|
||||
test_format $image png 0 [compression=9,interlace=1]
|
||||
test_format $image jpg 70
|
||||
test_format $image jpg 90
|
||||
test_format $image ppm 0
|
||||
test_format $image pfm 0
|
||||
test_format $image fits 0
|
||||
@ -151,11 +151,11 @@ test_format $image fits 0
|
||||
test_format $mono csv 0
|
||||
|
||||
# cmyk jpg is a special path
|
||||
test_format $cmyk jpg 70
|
||||
test_format $cmyk jpg 90
|
||||
test_format $cmyk tif 0
|
||||
test_format $cmyk tif 70 [compression=jpeg]
|
||||
test_format $cmyk tif 70 [compression=jpeg,tile]
|
||||
test_format $cmyk tif 70 [compression=jpeg,tile,pyramid]
|
||||
test_format $cmyk tif 90 [compression=jpeg]
|
||||
test_format $cmyk tif 90 [compression=jpeg,tile]
|
||||
test_format $cmyk tif 90 [compression=jpeg,tile,pyramid]
|
||||
|
||||
test_rad $rad
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
# set -x
|
||||
|
||||
# don't run this set of tests as part of make check -- some platforms do make
|
||||
# check before install and it's too hard to make pyvips8 work without
|
||||
# installation
|
||||
|
||||
. ./variables.sh
|
||||
|
||||
echo "testing with python2 ..."
|
||||
|
@ -5,13 +5,13 @@
|
||||
. ./variables.sh
|
||||
|
||||
# make a large PNG, roughly the size of Chicago.png
|
||||
echo -n "building huge test PNG image ... "
|
||||
printf "building huge test PNG image ... "
|
||||
vips replicate $image $tmp/huge.png 30 5
|
||||
echo "ok"
|
||||
|
||||
huge=$tmp/huge.png
|
||||
|
||||
echo -n "testing vipsthumbnail ... "
|
||||
printf "testing vipsthumbnail ... "
|
||||
rm -f $tmp/x.png
|
||||
vipsthumbnail $huge -o $tmp/x.png
|
||||
if ! vipsheader $tmp/x.png > /dev/null 2>&1 ; then
|
||||
@ -26,7 +26,7 @@ if [ ! -d $tmp/readonly ] ; then
|
||||
fi
|
||||
export TMPDIR=$tmp/readonly
|
||||
|
||||
echo -n "testing vipsthumbnail does not make temps ... "
|
||||
printf "testing vipsthumbnail does not make temps ... "
|
||||
rm -f $tmp/x.png
|
||||
vipsthumbnail $huge -o $tmp/x.png
|
||||
if ! vipsheader $tmp/x.png > /dev/null 2>&1 ; then
|
||||
@ -35,7 +35,7 @@ if ! vipsheader $tmp/x.png > /dev/null 2>&1 ; then
|
||||
fi
|
||||
echo "ok"
|
||||
|
||||
echo -n "testing shrink does not make temps ... "
|
||||
printf "testing shrink does not make temps ... "
|
||||
rm -f $tmp/x.png
|
||||
vips shrink $huge $tmp/x.png 230 230
|
||||
if ! vipsheader $tmp/x.png > /dev/null 2>&1 ; then
|
||||
|
@ -26,7 +26,7 @@ break_threshold() {
|
||||
for interp in nearest bilinear bicubic lbb nohalo vsqbs; do
|
||||
size=1000
|
||||
while [ $size -gt 499 ]; do
|
||||
echo -n "testing $interp, size to $size ... "
|
||||
printf "testing $interp, size to $size ... "
|
||||
vipsthumbnail $tmp/t1.v -o $tmp/t2.v --size $size --interpolator $interp
|
||||
if [ $(vipsheader -f width $tmp/t2.v) -ne $size ]; then
|
||||
echo failed -- bad size
|
||||
|
Loading…
Reference in New Issue
Block a user