jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sant...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/bin watchdog.bat watchdog.sh
Date Tue, 03 Oct 2000 22:29:57 GMT
santosh     00/10/03 15:29:56

  Added:       src/bin  watchdog.bat watchdog.sh
  Log:
  watchdog 4.0
  
  Revision  Changes    Path
  1.1                  jakarta-watchdog-4.0/src/bin/watchdog.bat
  
  Index: watchdog.bat
  ===================================================================
  @echo off
  
  if "%1"=="" goto exit
  
  set HOST=localhost
  set PORT=8080
  
  if "%2"=="" goto nohost
  set HOST=%2
  :nohost
  if "%3"=="" goto noport
  set PORT=%3
  :noport
  
  SET WATCHDOG_HOME=..
  
  set TOM_PREV_CLASSPATH=%CLASSPATH%
  
  SET CLASSPATH=%WATCHDOG_HOME%\lib\moo.jar;%CLASSPATH%
  SET CLASSPATH=%WATCHDOG_HOME%\lib\testdriver.jar;%CLASSPATH%
  SET CLASSPATH=%WATCHDOG_HOME%\lib\client.jar;%CLASSPATH%
  SET CLASSPATH=%WATCHDOG_HOME%\lib\ant.jar;%CLASSPATH%
  
  echo "using classpath=" %CLASSPATH%
  if "%1"=="servlet" goto servlet
  
  java org.apache.tools.ant.Main -Dport %PORT% -Dhost %HOST% -Dwatchdog.home %WATCHDOG_HOME%
-f %WATCHDOG_HOME%/conf/jsp-gtest.xml jsp-test
  
  if "%1"=="jsp" goto restore
  
  :servlet
  java org.apache.tools.ant.Main -Dport %PORT% -Dhost %HOST% -Dwatchdog.home %WATCHDOG_HOME%
-f %WATCHDOG_HOME%/conf/servlet-moo.xml servlet-test
  
  
  :restore
  set CLASSPATH=%TOM_PREV_CLASSPATH%
  set WATCHDOG_HOME=
  set PORT=
  set HOST=
  
  goto end
  
  :exit
  echo usage: %0 {all/jsp/servlet} [serverhost] [serverport] 
  
  :end
  
  
  
  1.1                  jakarta-watchdog-4.0/src/bin/watchdog.sh
  
  Index: watchdog.sh
  ===================================================================
  #!/bin/sh
  #
  
  # Shell script to run watchdog test suite
   
  if [ "$1" = "" ] ; then
      echo usage: "$0 {all|jsp|servlet} [serverhost] [serverport]"
      exit 0
  fi
  
  HOST=localhost
  PORT=8080
  default=$1
  
  if [ "$2" != "" ] ; then
      HOST=$2
  fi
  if [ "$3" != "" ] ; then
      PORT=$3
  fi
  
  if [ -f $HOME/.watchdogrc ] ; then 
    . $HOME/.watchdogrc
  fi
  
  if [ "$WATCHDOG_HOME" = "" ] ; then
    ## resolve links - $0 may be a link to  home
    PRG=$0
    progname=`basename $0`
    
    while [ -h "$PRG" ] ; do
      ls=`ls -ld "$PRG"`
      link=`expr "$ls" : '.*-> \(.*\)$'`
      if expr "$link" : '.*/.*' > /dev/null; then
  	PRG="$link"
      else
  	PRG="`dirname $PRG`/$link"
      fi
    done
    
    WATCHDOG_HOME_1=`dirname "$PRG"`/..
    echo "Guessing WATCHDOG_HOME from watchdog.sh to ${WATCHDOG_HOME_1}" 
      if [ -d ${WATCHDOG_HOME_1}/conf ] ; then 
  	WATCHDOG_HOME=${WATCHDOG_HOME_1}
  	echo "Setting WATCHDOG_HOME to $WATCHDOG_HOME"
      fi
  fi
  
  if [ "$WATCHDOG_HOME" = "" ] ; then
      echo WATCHDOG_HOME not set, you need to set it or install in a standard location
      exit 1
  fi
  
  
  cp=$CLASSPATH
  
  CLASSPATH=${WATCHDOG_HOME}/lib/ant.jar:$CLASSPATH
  CLASSPATH=${WATCHDOG_HOME}/lib/moo.jar:$CLASSPATH
  CLASSPATH=${WATCHDOG_HOME}/lib/testdriver.jar:$CLASSPATH
  CLASSPATH=${WATCHDOG_HOME}/lib/client.jar:$CLASSPATH
  
  CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar
  CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/classes.zip
  
  if [ "$cp" != "" ] ; then
      CLASSPATH=${CLASSPATH}:${cp}
  fi
  
  export CLASSPATH
  
  echo Using classpath: ${CLASSPATH}
  echo
  
  if [ "${default}" = jsp -o "${default}" = all ] ; then
      java org.apache.tools.ant.Main -Dport=${PORT} -Dhost=${HOST} \
          -Dwatchdog.home=${WATCHDOG_HOME} -f ${WATCHDOG_HOME}/conf/jsp-gtest.xml jsp-test
  fi
  
  if [ "${default}" = servlet -o "${default}" = all ] ; then
      java org.apache.tools.ant.Main -Dport=${PORT} -Dhost=${HOST} \
          -Dwatchdog.home=${WATCHDOG_HOME} -f ${WATCHDOG_HOME}/conf/servlet-moo.xml servlet-test
  fi
  
  if [ "${default}" = gtestservlet -o "${default}" = all ] ; then
      java org.apache.tools.ant.Main -Dport=${PORT} -Dhost=${HOST} \
          -Dwatchdog.home=${WATCHDOG_HOME} -f ${WATCHDOG_HOME}/conf/servlet-gtest.xml gtestservlet-test
  fi
  
  if [ "$cp" != "" ] ; then
      CLASSPATH=${cp}
      export CLASSPATH
  else
      unset CLASSPATH
  fi
  
  exit 0
  
  
  

Mime
View raw message