about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-11-27 21:09:09 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2016-11-27 21:09:09 +0000
commit82a14e1f3dde2ec2283b6f841d2c5e6287c06d8c (patch)
tree0d571a0c570f987079e1f437788a5cd26878bed9 /test
parent379943af220c6666ad3ede29441f9cf808cf9804 (diff)
downloadnetpbm-mirror-82a14e1f3dde2ec2283b6f841d2c5e6287c06d8c.tar.gz
netpbm-mirror-82a14e1f3dde2ec2283b6f841d2c5e6287c06d8c.tar.xz
netpbm-mirror-82a14e1f3dde2ec2283b6f841d2c5e6287c06d8c.zip
Don't try to test a program that wasn't built
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2838 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rwxr-xr-xtest/all-in-place.test38
-rwxr-xr-xtest/fiasco-roundtrip.test4
-rwxr-xr-xtest/jbig-roundtrip.test3
-rwxr-xr-xtest/tiff-roundtrip.test3
-rwxr-xr-xtest/utahrle-roundtrip.test3
5 files changed, 51 insertions, 0 deletions
diff --git a/test/all-in-place.test b/test/all-in-place.test
index e372d373..1a6b30c1 100755
--- a/test/all-in-place.test
+++ b/test/all-in-place.test
@@ -367,11 +367,49 @@ ordinary_testprogs="\
   zeisstopnm \
 "
 
+enabled_testprog() {
+    case $1 in
+      fiascotopnm|\
+      pnmtofiasco)
+        [ "${BUILD_FIASCO}" = "N" ] && return 1 ;;
+
+      jpeg2ktopam|\
+      pamtojpeg2k)
+        [ "${JASPERLIB}" = "NONE" ] && return 1 ;;
+
+      jbigtopnm|\
+      pnmtojbig)
+        [ "${JBIGLIB}" = "NONE" ] && return 1 ;;
+
+      jpegtopnm|\
+      pnmtojpeg|\
+      ppmtojpeg)
+        [ "${JPEGLIB}" = "NONE" ] && return 1 ;;
+
+      pamtotiff|\
+      pnmtotiffcmyk|\
+      tifftopnm)
+        [ "${TIFFLIB}" = "NONE" ] && return 1 ;;
+
+      pnmtorle|\
+      rletopnm)
+        [ "${URTLIB}" = "NONE" ] && return 1 ;;
+    esac
+
+    return 0
+}
+
 # The string "fiascotopnm" has to be filtered out by egrep for fiascotopnm
 # has a slightly different version report format.
 
 for i in $ordinary_testprogs
   do
+    # Stub out programs that aren't built.
+    if ! enabled_testprog "$i"; then
+      echo "$i: ok"
+      continue
+    fi
+
     $i --version  2>&1 | \
     egrep -v -e fiascotopnm -e \
     "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \
diff --git a/test/fiasco-roundtrip.test b/test/fiasco-roundtrip.test
index f733c04a..8ba0111a 100755
--- a/test/fiasco-roundtrip.test
+++ b/test/fiasco-roundtrip.test
@@ -2,6 +2,10 @@
 # This script tests: pnmtofiasco fiascotopnm
 # Also requires: pnmpad
 
+if [ "${BUILD_FIASCO}" = "N" ]; then
+  exit 80
+fi
+
 # Should print 215556145 102615
 
 pnmpad --black --bottom 1 --left 1 testimg.ppm | \
diff --git a/test/jbig-roundtrip.test b/test/jbig-roundtrip.test
index 5e96a001..33800348 100755
--- a/test/jbig-roundtrip.test
+++ b/test/jbig-roundtrip.test
@@ -2,6 +2,9 @@
 # This script tests: pnmtojbig jbigtopnm
 # Also requires: pamchannel pamtopnm
 
+if [ "${JBIGLIB}" = "NONE" ]; then
+  exit 80
+fi
 
 # Test 1.  Should print 2425386270 41
 pnmtojbig testgrid.pbm | jbigtopnm | cksum
diff --git a/test/tiff-roundtrip.test b/test/tiff-roundtrip.test
index a99425fa..bb8a2dc0 100755
--- a/test/tiff-roundtrip.test
+++ b/test/tiff-roundtrip.test
@@ -2,6 +2,9 @@
 # This script tests: pamtotiff tifftopnm
 # Also requires:
 
+if [ "${TIFFLIB}" = "NONE" ]; then
+  exit 80
+fi
 
 # Failure message
 ## Second test fails if Netpbm was built without the flate library
diff --git a/test/utahrle-roundtrip.test b/test/utahrle-roundtrip.test
index 982b72a9..ff959990 100755
--- a/test/utahrle-roundtrip.test
+++ b/test/utahrle-roundtrip.test
@@ -2,6 +2,9 @@
 # This script tests: pnmtorle rletopnm
 # Also requires: pamchannel pamtopnm
 
+if [ "${URTLIB}" = "NONE" ]; then
+  exit 80
+fi
 
 #Test 1.  Should produce 1571496937 33838, cksum of testimg.red
 pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \