Changeset 19381 for trunk/ippTasks/simtest.pro
- Timestamp:
- Sep 4, 2008, 2:30:59 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/simtest.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/simtest.pro
r19266 r19381 1 1 ## simtest.pro : automatic full-suite simulated IPP test : -*- sh -*- 2 2 3 ## there are four features which define a simtest run: 4 ## the camera : any camera can be used, the sim... cameras are defined to be quick tests 5 ## the sequence : this file defines the set of observations generated 6 ## the auto : the automation file defines the sequence of analysis performed 7 ## the recipe : the ppsim recipe defines the features which are included in the generate data 8 9 ## these are not completely independent: a certain sequence may be 10 ## required to yield a sensible result for a specific auto, and a 11 ## specific recipe may also be needed 12 13 if ($?PPSIM_RECIPE == 0) 14 $PPSIM_RECIPE = default 15 end 16 if ($?SIMTEST_CAMERA == 0) 17 $SIMTEST_CAMERA = SIMTEST 18 end 19 if ($?SIMTEST_SEQUENCE == 0) 20 $SIMTEST_SEQUENCE = simtest.basic.config 21 end 22 if ($?SIMTEST_AUTO == 0) 23 $SIMTEST_AUTO = simtest.basic.auto 24 end 25 if ($?SIMTEST_THREADS == 0) 26 $SIMTEST_THREADS = 0 27 end 28 3 29 macro simtest 4 if ($0 != 6) 5 echo "USAGE: simtest (testroot) (dbname) (hostname) (threads) (init)" 6 echo " if (init) == 0, just run the analysis tasks" 7 echo " if (init) == 1, (re)create the database and (re)inject the images" 8 echo " if (init) == 2, restart completely from scratch" 30 if ($0 != 4) 31 echo "USAGE: simtest (dbname) (hostname) (init)" 32 echo " if (init) == run : just run the analysis tasks" 33 echo " if (init) == inject : (re)create the database and (re)inject the images" 34 echo " if (init) == new : restart completely from scratch" 35 echo "" 36 echo "there are additional options which may be specified by setting the following variable names:" 37 echo " PPSIM_RECIPE : define the recipe to use when generating the fake data" 38 echo " SIMTEST_CAMERA : define an alternate camera (otherwise uses entry in sequence file)" 39 echo " SIMTEST_SEQUENCE : define the set of observations generated (simtest.basic.config)" 40 echo " SIMTEST_AUTO : define the analysis steps to perform (simtest.auto)" 41 echo " SIMTEST_THREADS : set the number of threads for the processing node (0)" 9 42 break 10 43 end 11 44 12 $testroot = $1 13 $dbname = $2 14 $hostname = $3 15 $threads = $4 45 $dbname = $1 46 $hostname = $2 47 $init = $3 48 if (("$init" != "run") && ("$init" != "inject") && ("$init" != "new")) 49 echo "USAGE: simtest (dbname) (hostname) (init)" 50 echo " if (init) == run : just run the analysis tasks" 51 echo " if (init) == inject : (re)create the database and (re)inject the images" 52 echo " if (init) == new : restart completely from scratch" 53 break 54 end 16 55 17 if ( $5 > 0)56 if (("$init" == "new") || ("$init" == "new")) 18 57 # XXX this will fail and exit the script if the db does not exist or is old... 19 58 exec pxadmin -delete -dbname $dbname … … 22 61 exec pxadmin -create -dbname $dbname 23 62 24 if ( $5 == 2)63 if ("$init" == "new") 25 64 # the labels "wait" and "proc" are special names used in automate.pro 26 exec ppSimSequence $MODULES:0/$testroot.config $testroot.mkimages $testroot.inject -path raw -workdir work -dbname $dbname -label wait -dvodb DVO -tess_id TESS 27 # not ready for this yet 28 # -ppsim_recipe FLATCORR 65 66 $ppsim = "ppSimSequence $MODULES:0/$SIMTEST_SEQUENCE simtest.mkimages simtest.inject -path raw -workdir work -dbname $dbname -label wait -dvodb DVO -tess_id TESS" 67 if ("$PPSIM_RECIPE" != "default") 68 $ppsim = $ppsim -ppsim_recipe $PPSIM_RECIPE 69 end 70 $ppsim = $ppsim -camera $SIMTEST_CAMERA 29 71 30 exec source $testroot.mkimages72 exec $ppsim 31 73 74 exec source simtest.mkimages 75 76 ## XXX this will need to be optional as well 32 77 file TESS/Images.dat found 33 78 if ($found == 0) … … 37 82 38 83 exec chiptool -dbname $dbname -block -label wait 39 exec source $testroot.inject84 exec source simtest.inject 40 85 end 41 86 … … 45 90 module.tasks 46 91 47 controller host add $hostname 92 if ($SIMTEST_THREADS == 0) 93 controller host add $hostname 94 else 95 controller host add $hostname -threads $SIMTEST_THREADS 96 end 97 48 98 add.database $dbname 49 99 50 automate.load simtest.auto$dbname100 automate.load $SIMTEST_AUTO $SIMTEST_CAMERA $dbname 51 101 run 52 102 end 53 103 54 104 # XXX add a test function to pxadmin to check for db existence 105 106 ## currently defined options for sequence, etc: 107 108 # sequence: simtest.basic.config, simtest.flatcorr.config 109 # auto: simtest.basic.auto, simtest.flatcorr.auto 110 111 macro simtest.setup.flatcorr 112 $PPSIM_RECIPE = FLATCORR 113 $SIMTEST_SEQUENCE = simtest.flatcorr.config 114 $SIMTEST_AUTO = simtest.flatcorr.auto 115 end
Note:
See TracChangeset
for help on using the changeset viewer.
