| 1 |
#! /bin/csh |
| 2 |
# |
| 3 |
# Generate a test run for all test cases, organizing the output into |
| 4 |
# a subdirectory of the cwd. |
| 5 |
# |
| 6 |
# Presently hardcodes a bunch of information: where to get the test data, |
| 7 |
# and the list of ***python modules*** that contain the tests. Uses |
| 8 |
# nosetests to run the tests. |
| 9 |
# |
| 10 |
# Accepts a run name as an argument, or prompts for one. |
| 11 |
#..................................................................... |
| 12 |
if ( "$1" == "" ) then |
| 13 |
echo -n "Enter test run name (to which revision will be appended): " |
| 14 |
set rname = $< |
| 15 |
else |
| 16 |
set rname = $1 |
| 17 |
endif |
| 18 |
|
| 19 |
#.................................................. |
| 20 |
#Append the revision number; silly humans get it wrong |
| 21 |
set revset = `svnversion | awk -F: '{print $2}'` |
| 22 |
if ( "$revset" == "") then |
| 23 |
set revset = `svnversion` |
| 24 |
endif |
| 25 |
|
| 26 |
set dirname = {$rname}_r{$revset} |
| 27 |
|
| 28 |
#......................................... |
| 29 |
# User may specify the list of tests; if not, use the full set. |
| 30 |
if ( "$2" == "" ) then |
| 31 |
set tlist = "science_cases acs_etc_cases nicmos_etc_cases stis_etc_cases wfc3_ir_imaging_78_cases wfc3_ir_spec_61_cases wfc3_uvis1_imaging_61_cases wfc3_uvis1_spec_62_cases wfc3_uvis2_imaging_18_cases wfc3_uvis2_spec_18_cases nicmos_etc_thermback_cases wfc3_ir_imaging_80_thermback wfc3_ir_spec_62_thermback acs_rn_cases nicmos_rn_cases stis_rn_cases wfc3_rn_ir1_cases invalid_rn_cases" |
| 32 |
else |
| 33 |
shift |
| 34 |
set tlist = "$*" |
| 35 |
endif |
| 36 |
|
| 37 |
#set tlist = "fewcases science_cases" |
| 38 |
#......................................... |
| 39 |
#irafdev |
| 40 |
set codeplace = /data/gaudete1/dg1/laidler/ssb/checkout/pysynphot/test/commissioning |
| 41 |
setenv PATH {$PATH}:{$codeplace} |
| 42 |
setenv PYTHONPATH {$PYTHONPATH}:{$codeplace} |
| 43 |
|
| 44 |
if ( ! $?PYSYN_CDBS ) then |
| 45 |
echo PYSYN_CDBS must be defined.... aborting. |
| 46 |
exit 1 |
| 47 |
endif |
| 48 |
|
| 49 |
echo crrefer is $crrefer |
| 50 |
|
| 51 |
echo $PYTHONPATH |
| 52 |
python -c "import pysynphot ; print pysynphot.__file__" |
| 53 |
python printversion.py |
| 54 |
echo $PYSYN_CDBS |
| 55 |
#................................................... |
| 56 |
# Set up a test directory |
| 57 |
mkdir -p $dirname |
| 58 |
cd $dirname |
| 59 |
tar -xzf /eng/ssb/syn_pysyn/testdata.tar.gz |
| 60 |
#.................................................... |
| 61 |
foreach tname ($tlist) |
| 62 |
echo $tname |
| 63 |
### nosetests $tname >& `echo "$tname" | sed 's/.py/.log/'` |
| 64 |
nosetests $tname >& $tname.log |
| 65 |
casestats.csh $tname > $tname.stats |
| 66 |
set instr = `echo $tname | awk -F _ '{print $1}'` |
| 67 |
python $codeplace/doscalars.py $tname/testefflam efflam $instr |
| 68 |
python $codeplace/doscalars.py $tname/testcountrate countrate $instr |
| 69 |
end |