Index: /branches/eam_branches/ipp-20121219/ippToPsps/test/fulltest.sh
===================================================================
--- /branches/eam_branches/ipp-20121219/ippToPsps/test/fulltest.sh	(revision 34994)
+++ /branches/eam_branches/ipp-20121219/ippToPsps/test/fulltest.sh	(revision 34994)
@@ -0,0 +1,108 @@
+#!/bin/csh -f
+
+# a bit crude : get the datadir path by interpollation of the PATH element for psconfig
+foreach f ( `echo $PATH | tr : ' '` )
+  echo $f | grep $PSCONFDIR > /dev/null
+  if ($status) continue
+  set datadir = `echo $f | sed s/bin\$/share/`
+  break
+end
+setenv IPPTOPSPS_DATA $datadir/ipptopsps
+
+set initdb = 0
+set mkdummy = 0
+set initscratch = 1
+set createqueue = 1
+set initbatch = 0
+set queuename = "test4"
+
+# create the ipptopsps database
+if ($initdb) then 
+
+  # does the database already exist?
+  # XXX this command will blow away an existing database!!
+  mysql -h localhost -u dvo -pdvo ipptopsps < $IPPTOPSPS_DATA/ippToPspsDbSchema.sql
+
+endif
+
+# create a dummy config so setupScratchDb.py does not fail
+if ($mkdummy) then
+  ippjython queue.py edit <<EOF
+dummy
+none
+IPP_PSPS
+0
+none
+none
+0
+0
+0
+0
+1
+none
+0
+0
+1
+1
+2001-01-01 00:00:00.0
+NONE
+NONE
+1
+0
+0
+1
+EOF
+endif
+
+# re-create the ipptopsps database
+if ($initscratch) then 
+
+  # create the database (ignore failure if it already exists)
+  mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch"
+  # mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch2"
+  # mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch3"
+
+  mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch"
+  # mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch2"
+  # mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch3"
+
+  ippjython setupScratchDb.py dummy ipptopsps_scratch
+  # ippjython setupScratchDb.py dummy ipptopsps_scratch2
+  # ippjython setupScratchDb.py dummy ipptopsps_scratch3
+endif
+
+# this code is sensitive to a previously existing database?
+if ($createqueue) then
+  ippjython queue.py edit <<EOF
+$queuename
+test_ds
+IPP_PSPS
+0
+catdir.cam
+test/catdir.cam
+9
+11
+19
+21
+1
+test
+0
+0
+1
+1
+2012-12-10 00:00:00.0
+3PI
+3PI
+1
+0
+0
+1
+y
+y
+EOF
+endif
+
+if ($initbatch) then
+  ippjython loader.py $queuename init
+endif
+
