From bf10a762dff0cd76684eae02c9172b70410da60d Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 31 Mar 2003 14:05:41 -0500 Subject: [svn-r6548] Purpose: New Feature Description: Some machine has a different hostname from its official name (e.g., copper is called Cu12) and some machine name are dynamic aliases (e.g., titan is mapped user01 or user02). Some names are cryptic (who could remember hn0? are platinum hosts while user0? are for titan). We had to hardcode those names into the snaptest.cfg file. An ongoing maintenance PAIN. Solution: Added -configname option where "use as hostname in the parsing of the snaptest configure file" Changed RSH code to append the hostname used in the Allhostfile. Now, we need not worry about machine name mapped to a different host and it is much cleaner to match up entries between allhostfile and snaptest.cfg files. Platforms tested: Did not use h5committest which does not cover this code. Tested in eirene, titan, platinum and copper. Misc. update: --- bin/runtest | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bin/runtest b/bin/runtest index 12985b7..3afa711 100755 --- a/bin/runtest +++ b/bin/runtest @@ -54,6 +54,7 @@ SNAPCMD="$SRCDIR test clean" # Default Standard snaptest command options STANDARD_OPT="" ENABLE_PARALLEL="--enable-parallel" +CONFIGNAME=$HOSTNAME # Name used in the SNAPTESTCFG file # test host default as local host. TESTHOST="" @@ -403,7 +404,7 @@ SNAPTEST_CONFIG_PARSE() #standard configuration STANDARD_OPT="$y" ;; - all: | ${HOSTNAME}:) + all: | ${CONFIGNAME}:) # types of test for all hosts or this host if [ -n "$TEST_TYPES" ]; then TEST_TYPES="$TEST_TYPES ; $y" @@ -462,6 +463,8 @@ Usage: runtest [-h] [-debug] [-r] [-all] [-nocvs] [-nodiff] [ ... do not do cvs commands -nodiff do not do diff commands + -configname + use as hostname in the parsing of the snaptest configure file launch tests for @@ -517,6 +520,11 @@ while [ $# -gt 0 ]; do # do not do diff commands NODIFF=nodiff ;; + -configname) + # use as hostname in the parsing of the snaptest configure file + shift + CONFIGNAME=$1 + ;; -*) # Unknow option PRINT "Unknown option ($1)" USAGE @@ -671,16 +679,17 @@ if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then # run the remote shell command with output to $TMP_OUTPUT case "$RSH" in rsh|ssh) - PRINT $RSH $h -n $PROGNAME + CMD="$RSH $h -n $PROGNAME -configname $h" + PRINT $CMD # kludge: some how eirene and houdin can not have # rsh connections too close. wait a few seconds test $h = houdin && echo "wait 10 sec for houdin" && sleep 10 # launch concurrent tests only if srcdir is used if [ -n "$SRCDIR" ]; then - $RSH $h -n $PROGNAME & + $CMD & else - $RSH $h -n $PROGNAME + $CMD fi ;; NoRemoteCommand) -- cgit v0.12