Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/test/pstamptest.reset.sh
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/test/pstamptest.reset.sh	(revision 43110)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/test/pstamptest.reset.sh	(revision 43111)
@@ -28,8 +28,17 @@
 set day   = `date +%d`
 
-foreach f ($workdir/$year/$month/$day/*)
-  echo rm -rf $f
-       rm -r f$f
-end
+test -e $workdir/$year/$month/$day
+if ($status == 0) then
+  set Ndir = `ls $workdir/$year/$month/$day`
+
+  if ($Ndir) then  
+    foreach f ($workdir/$year/$month/$day/*)
+      echo rm -rf $f
+           rm -r f$f
+    end
+  endif
+endif
+
+echo "removed old pstamp workdir entries"
 
 mysql -h localhost -u ipp -p pstamp < ~/src/panstarrs/ipp-pstamp-20260424/pstamp/doc/droptables.sql
Index: /branches/eam_branches/ipp-pstamp-20260421/pstamp/test/pstamptest.run.sh
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/pstamp/test/pstamptest.run.sh	(revision 43110)
+++ /branches/eam_branches/ipp-pstamp-20260421/pstamp/test/pstamptest.run.sh	(revision 43111)
@@ -7,12 +7,25 @@
 ## be added to the pstamp pantasks
 
-## These commands define access control for a specific user and/or domain
-if (0) then
-  ./reset.sh
-endif
+## This script also assumes the simtest.quickmos suite has been run
 
 # generate the faked web requests:
 
-if (0) then
+if ($#argv != 1) then
+  echo "USAGE: pstamptest.run.sh (mode)"
+  echo " (mode) = 'make' or 'proc'"
+  echo " make : generate a set of pstamp web requests"
+  echo " proc : manually process the pstamp requests and jobs"
+  exit 2;
+endif
+
+set mode = 
+if ("$1" == "make") set mode = $1
+if ("$1" == "proc") set mode = $1
+if ($mode == "") then
+  echo "ERROR: invalid value for (mode) : $1"
+  exit 3
+endif
+
+if ($mode == "make") then
   # by exp_name (raw & chip)
   pstamp_webrequest.pl --label TEST --dbname pstamp --dbserver localhost --username magnier@hawaii.edu --email magnier@hawaii.edu --project simtest --pixcenter --x 100 --y 100  --width 51 --height 51 --req_type byexp --stage raw  --id sim.003.000 --component XY00      --survey bypass --jpeg --allroi
@@ -27,5 +40,5 @@
 endif
 
-if (1) then
+if ($mode == "make") then
   # select by exposure name, location by coordinates:
   pstamp_webrequest.pl --label TEST --dbname pstamp --dbserver localhost --username magnier@hawaii.edu --email magnier@hawaii.edu --project simtest --ra 270.016608 --dec 30.026109 --width 50 --height 50 --req_type byexp --stage chip --id sim.003.000 --component XY11 --survey bypass --jpeg --allroi 
@@ -50,10 +63,12 @@
 endif
 
-set reqList = (`pstamptool -pendingreq -dbname pstamp | grep req_id     | awk '{print $3}'`)
-set i = 1
-while ($i <= $#reqList) 
-  ./proc_next_stamp.sh
-  @ i++
-end
+if ($mode == "proc") then
+  set reqList = (`pstamptool -pendingreq -dbname pstamp | grep req_id     | awk '{print $3}'`)
+  set i = 1
+  while ($i <= $#reqList) 
+    ./pstamptest.proc.sh
+    @ i++
+  end
+endif
 
 # failures:
