[Spambayes-checkins] spambayes runtest.sh,1.9,1.10

Neale Pickett npickett at users.sourceforge.net
Wed Jan 22 20:46:29 EST 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv28017

Modified Files:
	runtest.sh 
Log Message:
* Fixed runtest.sh to handle new paths for all the utilities
* moved hammie/* to contrib/*
* new spambayes.el for Gnus integration


Index: runtest.sh
===================================================================
RCS file: /cvsroot/spambayes/spambayes/runtest.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** runtest.sh	10 Oct 2002 09:21:55 -0000	1.9
--- runtest.sh	23 Jan 2003 04:46:27 -0000	1.10
***************
*** 1,3 ****
! #! /bin/sh -x
  ##
  ## runtest.sh -- run some tests for Tim
--- 1,3 ----
! #! /bin/sh -e
  ##
  ## runtest.sh -- run some tests for Tim
***************
*** 20,23 ****
--- 20,31 ----
  fi
  
+ # Include local directory in Python path
+ if [ -n "$PYTHONPATH" ]; then
+     PYTHONPATH=$PYTHONPATH:.
+ else
+     PYTHONPATH=.
+ fi
+ export PYTHONPATH
+ 
  # Which test to run
  TEST=${1:-run2}
***************
*** 42,70 ****
  esac
  
  if [ -n "$REBAL" ]; then
      # Put them all into reservoirs
!     python rebal.py -r Data/Ham/reservoir -s Data/Ham/Set -n 0 -q
!     python rebal.py -r Data/Spam/reservoir -s Data/Spam/Set -n 0 -q
      # Rebalance
!     python rebal.py -r Data/Ham/reservoir -s Data/Ham/Set -n $RNUM -q -Q
!     python rebal.py -r Data/Spam/reservoir -s Data/Spam/Set -n $RNUM -q -Q
  fi
  
  case "$TEST" in
      test1)
! 	python timtest.py -n $SETS > test1.txt
  	;;
      test2)
! 	python timtest.py -n $SETS > test2.txt
  	;;
      timcv1|cv1)
! 	python timcv.py -n $SETS > cv1.txt
  	;;
      timcv2|cv2)
! 	python timcv.py -n $SETS > cv2.txt
  
!         python rates.py cv1 cv2 > runrates.txt
  
!         python cmp.py cv1s cv2s | tee results.txt
  	;;
      *)
--- 50,80 ----
  esac
  
+ set -x
+ 
  if [ -n "$REBAL" ]; then
      # Put them all into reservoirs
!     python utilities/rebal.py -r Data/Ham/reservoir -s Data/Ham/Set -n 0 -q
!     python utilities/rebal.py -r Data/Spam/reservoir -s Data/Spam/Set -n 0 -q
      # Rebalance
!     python utilities/rebal.py -r Data/Ham/reservoir -s Data/Ham/Set -n $RNUM -q -Q
!     python utilities/rebal.py -r Data/Spam/reservoir -s Data/Spam/Set -n $RNUM -q -Q
  fi
  
  case "$TEST" in
      test1)
! 	python testtools/timtest.py -n $SETS > test1.txt
  	;;
      test2)
! 	python testtools/timtest.py -n $SETS > test2.txt
  	;;
      timcv1|cv1)
! 	python testtools/timcv.py -n $SETS > cv1.txt
  	;;
      timcv2|cv2)
! 	python testtools/timcv.py -n $SETS > cv2.txt
  
!         python testtools/rates.py cv1 cv2 > runrates.txt
  
!         python testtools/cmp.py cv1s cv2s | tee results.txt
  	;;
      *)





More information about the Spambayes-checkins mailing list