diff options
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 |