diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2003-03-26 22:14:35 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2003-03-26 22:14:35 (GMT) |
commit | 6cfa419f9a1b458f12661cff15ac069a038a15e6 (patch) | |
tree | 4df1eb2a1b9e3862c38d5bfc9d9c18d89d70670b /bin/runtest | |
parent | 37cefed10e68f61e91bc42e8bbf1d536d15a0dc8 (diff) | |
download | hdf5-6cfa419f9a1b458f12661cff15ac069a038a15e6.zip hdf5-6cfa419f9a1b458f12661cff15ac069a038a15e6.tar.gz hdf5-6cfa419f9a1b458f12661cff15ac069a038a15e6.tar.bz2 |
[svn-r6522] Purpose:
new feature and some bug fixes
Description:
Add a new feature to "skip" some tests.
Sometimes, a machine has problem (e.g. titan and sleipnir having AFS
problems). Sometimes some feature in a machine is temporary off (e.g.,
PGI compilers in eirene.) The tests will be reported being SKIPPED
which will be reminder to remove the skipping once the problem is fixed.
I installed the skipping control in snaptest.cfg rather than in
allhostsfile to have a finer control to skip just a subset of the
tests of a machine, rather than skipping the all tests of a machine.
Bug fixes: fixed the miscounting of number of tests ran. It was
reporting one too many.
Platforms tested:
Only tested in eirene since eirene is the one uses it directly.
Misc. update:
Diffstat (limited to 'bin/runtest')
-rwxr-xr-x | bin/runtest | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/bin/runtest b/bin/runtest index 08fa700..c2e1af7 100755 --- a/bin/runtest +++ b/bin/runtest @@ -110,7 +110,11 @@ REPORT_ERR() REPORT_RESULT() { if [ $retcode -eq 0 ]; then - PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG + if [ $skiptest = yes ]; then + PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG + else + PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG + fi else # test failed. REPORT_ERR "****FAILED ${HOSTNAME}: $TEST_TYPE****" @@ -253,11 +257,13 @@ RUNSNAPTEST() { SNAPCMD_OPT="$STANDARD_OPT" # snapshot test option SRCDIRNAME="" - CC_SAVED="$CC" - PATH_SAVED=$PATH + # restore CC, PATH in case they were changed in the last test. + CC="$CC_SAVED" + PATH=$PATH_SAVED export PATH # DEC OSF1 needs to export PATH explicitly TEST_TYPE=$* retcode=0 + skiptest=no date PRINT "*** starting $TEST_TYPE tests in $HOSTNAME ***" PRINT "Uname -a: `uname -a`" @@ -302,6 +308,10 @@ RUNSNAPTEST() export $1 shift; shift ;; + skip) + # skip this test + skiptest=yes + ;; *) # unknown test PRINT "$0: unknown type of test ($1)" retcode=1 @@ -309,7 +319,11 @@ RUNSNAPTEST() esac shift done - [ $retcode -ne 0 ] && errcode=$retcode && return $retcode +echo CC=$CC, PATH=$PATH + if [ $retcode -ne 0 -o $skiptest = yes ]; then + errcode=$retcode + return $retcode + fi # Track down the zlib software ans=`$SNAPYARD/current/bin/locate_sw zlib` @@ -342,10 +356,6 @@ RUNSNAPTEST() [ $retcode -ne 0 ] && errcode=$retcode date >> $LOGFILE - - # restore CC, PATH - CC="$CC_SAVED" - PATH=$PATH_SAVED } @@ -372,6 +382,7 @@ RUNSNAPTEST() # op-configure <option> configure option # --* configure option # setenv <name> <value> set environment variable <name> to <value> +# skip skip this test SNAPTEST_CONFIG_PARSE() { while read x y ; do @@ -469,6 +480,9 @@ EOF ################################# retcode=0 # error code of individula task errcode=0 # error code of the whole test +skiptest=no # if test is skipped +CC_SAVED="$CC" # CC & PATH maybe changed within a test. +PATH_SAVED=$PATH # These save the original values. ################################# @@ -703,7 +717,7 @@ fi # a $TYPE_TYPES that has no ';' (only 1 tst ). That results in no # test at all. # -n_test=1 +n_test=0 runtest_type="tests" TEST="`echo $TEST_TYPES | cut -f1 -d';'`" while [ -n "$TEST" ]; do |