Changes between Version 3 and Version 4 of addnewNR
- Timestamp:
- 11/15/14 14:12:24 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
addnewNR
v3 v4 1 Create a testXXX.m file with the simulation test and put in field_names, field_tolerances and field_values the names of the field you want to check for your test with the tolerances associated (because every computer is different) and the path to the values. 2 Put the name of your test in `IdToName.m` and run 1 == Introduction == 2 3 ISSM relies on regression tests to check that no bug is introduced during code development. All the tests are located in `$ISSM_DIR/test/test/NightlyRun` and all the tests whose number are less than 1000 are run after each change pushed to the svn repository (through jenkins) and 4 times a day (through cron jobs). 4 5 If a new capability is being added to ISSM, it is critical that a new test is created. 6 7 == Files to change/create == 8 9 Create a `testXXX.m` file with the simulation test and put in `field_names`, `field_tolerances` and `field_values` the names (no space) of the fields you want to check for your test with the tolerances associated (because every computer is different). 10 11 Put the name of your test in `IdToName.m` and run the following command to create the archive (the archive gives the reference values for all the fields that are checked): 3 12 4 13 {{{ … … 7 16 }}} 8 17 9 to create an archive in test/Archives where the reference values will be. This archive is the same for the Python test. Now if you run18 This archive is located in `$ISSM_DIR/test/test/archives` in NetCDF format, and is the same for the Python test if you create one as well. Now if you run 10 19 11 20 {{{ … … 14 23 }}} 15 24 16 it should write SUCCESS everywhere. If not, you may have used a too big coefficient like 10^48 in your code and every machine won’t give the same result.25 you should see SUCCESS everywhere. If not, you have to adjust the tolerances slightly. 17 26 18 NB : do the same thing for testXXX.py and IdToName.pywithout creating the archive this time.27 NB : do the same thing for `testXXX.py` and `IdToName.py` without creating the archive this time. 19 28 20 You can `svn add` the files and `svn commit –m “CHG : description”`. 29 == Checking in the new test == 30 31 You can `svn add` the new files (`testXXX.m`, `testXXX.py` and archiveXXX.nc) and `svn commit –m "NEW: added test to check ...”`.