-
Notifications
You must be signed in to change notification settings - Fork 31
Running regression tests locally
Build calxxx and install test dependencies as instructed in https://github.com/spacetelescope/hstcal/blob/main/INSTALL.md . Additionally, you can also install pytest-xdist (-n) for distributing tests across CPUs, but note that even without this, the CTE correction for ACS and WFC3 would use up all the cores anyway.
Set up environment variables and CRDS as instructed in https://github.com/spacetelescope/hstcal/blob/main/README.md . Example:
export jref="/grp/crds/cache/references/hst/"
export iref="/grp/crds/cache/references/hst/"
export oref="/grp/crds/cache/references/hst/"
export CRDS_PATH="/path/to/local/crds_cache"
export CRDS_SERVER_URL="https://hst-crds.stsci.edu"Download and configure jfrog as laid out in https://github.com/spacetelescope/jwst/wiki/Maintaining-Regression-Tests .
To set up local checkout of "big data" to $HOME (though it is preferable to store them to a disk that is physically close to the CPU, e.g., /internal/1):
$ mkdir ~/test_bigdata
$ mkdir ~/test_bigdata/scsb-hstcal
$ cd ~/test_bigdata/scsb-hstcal
$ jfrog rt dl "scsb-hstcal/dev/*" ./
$ export TEST_BIGDATA=$HOME/test_bigdata/The scsb-hstcal directory layout is as follows:
scsb-hstcal
environment (dev or n.n.n)
instrument (acs | wfc3 | stis)
detector (acs: hrc | sbc | wfc, wfc3: ir | uvis)
input
truth
To run all the tests from hstcal source checkout root directory:
$ pytest tests/ [-n 8] -s -v[vv] --bigdata --slow --basetemp=/path/to/pytest_output/ &> test_output.log-
-n 8: Use 8 CPUs. Find out how many you have first usingnprocbefore you set the number, preferably at most 1 less than max. -
-s: Shows screen output. -
-v: More verbose. Add morev's for even more. -
--bigdata: Run tests that needTEST_BIGDATAdefined to know where to locate the input FITS files. -
--slow: Run tests marked as slow. -
--basetemp: Write test output files into the given directory instead of/tmp. Files are loaded into this area and processed in subdirectories based on test names. Be careful as this area is destroyed for each newpytestrun. -
&> test_output.log: Capturestdoutandstderrinto the given log file. Monitor withtail -f test_output.log, if desired. The&tells it to run in the background.