diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-02-02 01:48:57 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-02-02 01:48:57 +0000 |
commit | 2f0b278d8156fb9c829f1ac97db5b8f2aab58717 (patch) | |
tree | 2bbc810809a84ca46758859ab167e060b3f6d7bc /test/Execute-Tests | |
parent | babc41a25094d444c75c6345a3958d16293f85c1 (diff) | |
download | netpbm-mirror-2f0b278d8156fb9c829f1ac97db5b8f2aab58717.tar.gz netpbm-mirror-2f0b278d8156fb9c829f1ac97db5b8f2aab58717.tar.xz netpbm-mirror-2f0b278d8156fb9c829f1ac97db5b8f2aab58717.zip |
Add ability to run tests for a specific program; add ability to print messages when tests fail; new tests
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2119 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/Execute-Tests')
-rwxr-xr-x | test/Execute-Tests | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/test/Execute-Tests b/test/Execute-Tests index 7a1a3793..68dd5581 100755 --- a/test/Execute-Tests +++ b/test/Execute-Tests @@ -118,12 +118,25 @@ export PATH=${srcdir}:$PATH # By default the tests are executed in the order described in the # file Test-Order. Copy this file from the source directory # to the work directory. +# +# The string "target" is a comma-separated list of target programs. +# When set only tests for programs in the list will be run. # # The --no-clobber version comes useful when the user wants a modified # (pared-down) version of Test-Order. -cp ${srcdir}/Test-Order ./Test-Order -#cp --no-clobber ${srcdir}/Test-Order ./Test-Order +if [ ! -z $target ] + then echo $target | sed 's/,/\n/g' | \ + sed 's/^/\${PBM_TESTPREFIX}/' | \ + grep -f - ${srcdir}/*.test -l | \ + while read i ; do echo ${i##*/} ; done | + grep -f - ${srcdir}/Test-Order > ./Test-Order ; + else + cp ${srcdir}/Test-Order ./Test-Order ; + #cp --no-clobber ${srcdir}/Test-Order ./Test-Order ; +fi + +#let array[5]=0 for t in `grep -v "^#" ./Test-Order | fgrep ".test"` do @@ -134,6 +147,7 @@ case $result in if [ $? -eq 0 ] then let result=0; rm ${t%.test}.out ; else let result=1; + grep "^##" ${srcdir}/$t # Print failure message. fi let testable=1 ;; 80) let result=4 ; let testable=0;; @@ -173,7 +187,7 @@ echo ================== for s in 0 1 2 3 4 5 do - if [[ ${array[${s}]} -gt 0 || s -eq 1 ]] + if [[ ${array[${s}]} -gt 0 || s -eq 1 || s -eq 5 ]] then echo ${status[${s}]} ${array[${s}]} fi done |