diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-12-13 16:45:02 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-12-13 16:45:02 +0000 |
commit | 041c0bd7451c3383b930f75555cc4ba42e2709d6 (patch) | |
tree | 6b4c26d60ca0c378ec366cd9127c500f8204e133 /test/Execute-Tests | |
parent | 68c1836441889f462cd1b11ca795381385309e13 (diff) | |
download | netpbm-mirror-041c0bd7451c3383b930f75555cc4ba42e2709d6.tar.gz netpbm-mirror-041c0bd7451c3383b930f75555cc4ba42e2709d6.tar.xz netpbm-mirror-041c0bd7451c3383b930f75555cc4ba42e2709d6.zip |
More handling in test of not-built programs
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2848 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/Execute-Tests')
-rwxr-xr-x | test/Execute-Tests | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/test/Execute-Tests b/test/Execute-Tests index 78091e6b..39d6a5d1 100755 --- a/test/Execute-Tests +++ b/test/Execute-Tests @@ -236,18 +236,29 @@ if [ $VALGRIND_TESTS = "on" ] fi # Execute a single test and test its result. - -PATH=${testpath} $vg_command ${srcdir}/$tname > ${tname%.test}.out; -let result=$? -case $result in -0) cmp -s ${tname%.test}.out ${srcdir}/${tname%.test}.ok ; - if [ $? -eq 0 ] - then let result=0; rm ${tname%.test}.out ; - else let result=1; - grep "^##" ${srcdir}/$tname # Print failure message. - fi ;; -80) let result=4 ;; -*) let result=1 ;; +# But first see if the target programs and requirements are in place. + +${srcdir}/Available-Testprog \ + `sed -n -e '/^# This script tests: /s/# This script tests: //p' \ + -e '/^# Also requires: /s/^# Also requires: //p' \ + -e '/^$/q' ${srcdir}/$tname | tr '\n' ' '` +case $? in +0) + PATH=${testpath} $vg_command ${srcdir}/$tname > ${tname%.test}.out; + let retval=$? + case $retval in + 0) cmp -s ${tname%.test}.out ${srcdir}/${tname%.test}.ok ; + if [ $? -eq 0 ] + then let result=0; rm ${tname%.test}.out ; + else let result=1; + grep "^##" ${srcdir}/$tname # Print failure message. + fi ;; + 80) let result=4 ;; + *) let result=1 ;; + esac ;; + +1) let result=4 ;; +*) let result=1 ;; esac # Report whether a single test succeeded or failed. |