about summary refs log tree commit diff
path: root/test/ppmcie.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-09-26 16:03:01 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-09-26 16:03:01 +0000
commit67e1689f9d7e6b8dfffe393f2d318e3e374c7a36 (patch)
tree5943a3e98e1f12ed80d92e2cb8c5623d8af9fcd3 /test/ppmcie.test
parentfd6e24ededb4ee1e92e101ea50fe21d88630c17f (diff)
downloadnetpbm-mirror-67e1689f9d7e6b8dfffe393f2d318e3e374c7a36.tar.gz
netpbm-mirror-67e1689f9d7e6b8dfffe393f2d318e3e374c7a36.tar.xz
netpbm-mirror-67e1689f9d7e6b8dfffe393f2d318e3e374c7a36.zip
Promote current development as Release 10.68
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2294 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/ppmcie.test')
-rwxr-xr-xtest/ppmcie.test16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/ppmcie.test b/test/ppmcie.test
index c4338195..973787ec 100755
--- a/test/ppmcie.test
+++ b/test/ppmcie.test
@@ -7,6 +7,12 @@
   alias pamsumm="${PBM_BINPREFIX}pamsumm"
   shopt -s expand_aliases
 
+# Failure message
+## Ppmcie is sensitive to system factors.  If this test fails, please
+## run the program and visually examine the output.
+
+tmpdir=${tmpdir:-/tmp}
+
 # Test 1. Should print 955840041 786447
 # Without -nolabel -noaxes -nowpoint -noblack older versions of
 # Netpbm produce slightly different charts.
@@ -14,8 +20,10 @@
 # v. 10.35.86: 288356530 786447   
 # v. 10.59.2 : 2292601420 786447  
 
+ppmcie_ppm=${tmpdir}/ppmcie.ppm
+
 ppmcie -nolabel -noaxes -nowpoint -noblack \
- > ${tmpdir}/ppmcie.ppm
+ > ${ppmcie_ppm}
 
 # There is a slight difference in the output depending on whether ppmcie
 # is compiled with SSE features are turned on or off.
@@ -31,7 +39,7 @@ ppmcie -nolabel -noaxes -nowpoint -noblack \
 # x86 32 bit: 38.660173
 # x86 64 bit: 38.681432
 
-pamsumm --mean --brief ${tmpdir}/ppmcie.ppm | \
+pamsumm --mean --brief ${ppmcie_ppm} | \
   awk '{ if(38.65 < $1 && $1 <38.69) print "ok"; else print $1}'
 
 # Test 2.  Measure image sharpness
@@ -39,9 +47,9 @@ pamsumm --mean --brief ${tmpdir}/ppmcie.ppm | \
 # x86 32 bit: 0.002476
 # x86 64 bit: 0.002478
 
-pamsharpness ${tmpdir}/ppmcie.ppm 2>&1 | \
+pamsharpness ${ppmcie_ppm} 2>&1 | \
   awk 'NF==3 && $1=="Sharpness" \
        {if (0.002475 < $3 && $3 < 0.002479) print "ok"; else print $3}
        NF>0 && NF!=3 {print "error"}'
 
-rm ${tmpdir}/ppmcie.ppm
+rm ${ppmcie_ppm}