From d69f683dddba3562db3777daab263e0795d7dcc7 Mon Sep 17 00:00:00 2001 From: someone Date: Tue, 5 Jun 2012 00:14:25 +0200 Subject: [PATCH] test script updates --- chk.sh | 28 +++++++++++++--------------- test.sh | 29 +++++++++++++---------------- 2 files changed, 26 insertions(+), 31 deletions(-) diff --git a/chk.sh b/chk.sh index bec7de0..99e2209 100755 --- a/chk.sh +++ b/chk.sh @@ -1,25 +1,23 @@ #!/bin/bash -if [[ "$1" == "" ]]; then - COMPONENTS="c psh w f s" -else +COMPONENTS="c psh w f s" +TESTS="`seq 1 1 9`" + +if [[ "$1" != "" ]]; then COMPONENTS="$1" fi - -if [[ "$2" == "" ]]; then - TESTS="1 2 3 4 5" -else +if [[ "$2" != "" ]]; then TESTS="$2" fi -for component in $(echo ${COMPONENTS}) -do - for test in $(echo ${TESTS}) - do - ret=`./dlv -silent ${component}.dl ${component}.test${test}.dl component.tester.dl -N=80 | egrep "UNCOMPUTED|UNEXPECTED|DUPLICATED"` - if [[ $? != 1 ]]; then - echo "Component ${component} failed at test ${test}:" - echo ${ret} +for component in $(echo ${COMPONENTS}) ; do + for test in $(echo ${TESTS}) ; do + if [ -e "${component}.test${test}.dl" ]; then + ret=`./dlv -silent ${component}.dl ${component}.test${test}.dl component.tester.dl -N=80 | egrep "UNCOMPUTED|UNEXPECTED|DUPLICATED"` + if [[ $? != 1 ]]; then + echo "Component ${component} failed at test ${test}:" + echo ${ret} + fi fi done done diff --git a/test.sh b/test.sh index ef3755a..af6e673 100755 --- a/test.sh +++ b/test.sh @@ -1,24 +1,21 @@ #!/bin/bash -if [[ "$1" == "" ]]; then - COMPONENTS="c psh w f s" -else - COMPONENTS="$1" -fi +COMPONENTS="c psh w f s" +TESTS="`seq 1 1 9`" -if [[ "$2" == "" ]]; then - TESTS="1 2 3 4 5" -else - TESTS="$2" +if [[ "$1" != "" ]]; then + COMPONENTS="$1" +fi +if [[ "$2" != "" ]]; then + TESTS="$2" fi -for component in $(echo ${COMPONENTS}) -do - echo "Testing components ${component}:" - for test in $(echo ${TESTS}) - do - echo "Running test ${test}:" - ./dlv -silent ${component}.dl ${component}.test${test}.dl component.tester.dl -N=80 +for component in $(echo ${COMPONENTS}) ; do + for test in $(echo ${TESTS}) ; do + if [ -e "${component}.test${test}.dl" ]; then + echo "Running test ${test}:" + ./dlv -silent ${component}.dl ${component}.test${test}.dl component.tester.dl -N=80 + fi done echo "" done -- 2.43.0