From c267823f944001e096f0e316588a56a4011435a9 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 27 Nov 2016 22:06:27 +0000 Subject: More skipping of tests of not-built components git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2839 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- GNUmakefile | 6 +++++- test/all-in-place.test | 13 +++++++++++++ test/legacy-names.test | 22 ++++++++++++++++++++++ test/png-roundtrip.test | 4 ++++ test/png-roundtrip2.test | 4 ++++ test/ps-roundtrip.test | 4 ++++ 6 files changed, 52 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index aac9c0c9..4e10e12c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -463,8 +463,12 @@ CHECK_VARS = \ JASPERLIB="$(JASPERLIB)" \ JBIGLIB="$(JBIGLIB)" \ JPEGLIB="$(JPEGLIB)" \ + PNGLIB="$(PNGLIB)" \ TIFFLIB="$(TIFFLIB)" \ - URTLIB="$(URTLIB)" + URTLIB="$(URTLIB)" \ + X11LIB="$(X11LIB)" \ + XML2_LIBS="$(XML2_LIBS)" \ + ZLIB="$(ZLIB)" # Test files in source tree. diff --git a/test/all-in-place.test b/test/all-in-place.test index 1a6b30c1..adcfa6d5 100755 --- a/test/all-in-place.test +++ b/test/all-in-place.test @@ -386,6 +386,16 @@ enabled_testprog() { ppmtojpeg) [ "${JPEGLIB}" = "NONE" ] && return 1 ;; + pamtopng|\ + pngtopam|\ + pnmtopng) + [ "${PNGLIB}" = "NONE" ] && return 1 ;; + + svgtopam) + [ "${PNGLIB}" = "NONE" ] && return 1 + [ "${XML2_LIBS}" = "NONE" ] && return 1 + ;; + pamtotiff|\ pnmtotiffcmyk|\ tifftopnm) @@ -394,6 +404,9 @@ enabled_testprog() { pnmtorle|\ rletopnm) [ "${URTLIB}" = "NONE" ] && return 1 ;; + + pamx) + [ "${X11LIB}" = "NONE" ] && return 1 ;; esac return 0 diff --git a/test/legacy-names.test b/test/legacy-names.test index 30509d20..8dbd97b4 100755 --- a/test/legacy-names.test +++ b/test/legacy-names.test @@ -94,8 +94,30 @@ ordinary_testprogs="\ ppmtouil \ " +enabled_testprog() { + case $1 in + ppmtojpeg) + [ "${JPEGLIB}" = "NONE" ] && return 1 ;; + + pamrgbatopng|\ + pngtopnm) + [ "${PNGLIB}" = "NONE" ] && return 1 ;; + + pnmtotiff) + [ "${TIFFLIB}" = "NONE" ] && return 1 ;; + esac + + return 0 +} + 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 \ "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ diff --git a/test/png-roundtrip.test b/test/png-roundtrip.test index 7e7c4a9b..d1b3dd76 100755 --- a/test/png-roundtrip.test +++ b/test/png-roundtrip.test @@ -6,6 +6,10 @@ ## If this test fails and pnm-roundtrip2.test succeeds, it indicates ## some problem with pnmtopng. +if [ "${PNGLIB}" = "NONE" ]; then + exit 80 +fi + # Test 1. Should print 1926073387 101484 18 times for flags in "" -interlace \ -gamma=.45 \ diff --git a/test/png-roundtrip2.test b/test/png-roundtrip2.test index af2ad029..b48bbf91 100755 --- a/test/png-roundtrip2.test +++ b/test/png-roundtrip2.test @@ -9,6 +9,10 @@ ## If both tests fail, the likely cause is a problem with pngtopam. ## It is also possible that there is some problem in libpng. +if [ "${PNGLIB}" = "NONE" ]; then + exit 80 +fi + # Test 1. Should print 1926073387 101484 twice for flags in "" -gamma=.45 do diff --git a/test/ps-roundtrip.test b/test/ps-roundtrip.test index 873bbdef..345795ff 100755 --- a/test/ps-roundtrip.test +++ b/test/ps-roundtrip.test @@ -8,6 +8,10 @@ ## (1) zlib was not linked. ## (2) ghostscript is not available. +if [ "${ZLIB}" = "NONE" ]; then + exit 80 +fi + tmpdir=${tmpdir:-/tmp} # pstopnm does not use libnetpbm functions for output. -- cgit 1.4.1