Preface, Foreword, and Introduction
Back to the documentation For Users?.
PLEASE BE SURE YOU RUN THE COMPLETE UETESTS SUITE BEFORE COMMITTING ANY NEW CODE!
Testing UEDGE
You will find the uetests suite in
.../facetsall/uetests
In order to run the tests, you have to decide which results you are going to compare your runs against. If you are running uetests for the first time on your platform, then you will start with an empty results directory which will be populated after your runs are completed. On the other hand, if you are running on a platform where accepted results currently exist (e.g., multipole.txcorp.com), then you would want to compare your results against those. In that case, you would check out the results like so:
svn co https://ice.txcorp.com/svnrepos/results/ueresults/trunk/multipole ueresults-multipole
Finally, uetests must be configured:
cd uetests (if you're not already there) config/cleanconf.sh ./configure --with-source-dir=/path/to/uedge/source --with-serial-dir=/path/to/uedge/serial/build --with-parallel-dir=/path/to/uedge/parallel/build --with-results-dir=/path/to/ueresults
...where source-dir is the directory containing your UEDGE source code, serial-dir is the top level of your serial UEDGE build, parallel-dir is the top level of your parallel UEDGE build (optional), and ueresults is either a checkout as noted above, or an empty directory you create, in the event you are running on a new platform.
At this point, you are ready to run the tests. Did we mention to "PLEASE BE SURE YOU RUN THE COMPLETE UETESTS SUITE BEFORE COMMITTING ANY NEW CODE!"
To run the entire suite of tests:
make check
During development, you may wish to run only a single test or subset of the tests in order to save time. This practice is acceptable, as long as you run the entire suite of tests prior to committing new code.
To run a single test, e.g., alloc-cxx.sh, you would
cd tests/setup ./alloc-cxx.sh
Of course, that simply runs the test, it does not compare the results of the test against your accepted results. To do that, you would
make check-test TEST_NAME=alloc-cxx
(Typing all of the above is tedious, so there is a file in the uetests/txtest subdir called 'test.aliases' which contains handy aliases for this and other tasks. If you source that file, either directly, or from your .bashrc, you'll be able to simply type
check alloc-cxx
Accepting your results
As mentioned above, when running uetests on a platform for which there are no accepted results (such as your local workstation or laptop), then your results directory will be unpopulated. In order to test whether changes you make to the code affect the results, you will need to "accept" your results.
Assuming the tests are passing on a platform for which there are accepted results (e.g., multipole.txcorp.com), you may safely assume that the results you are seeing on your platform are correct. (Yes, it's possible for the tests to pass on one platform and give incorrect results on a different platform, but that is left as an exercise for the reader, and assume there is architecture-specific code in uedge.)
To accept you results, ensure you are in the top-level dir of uetests and type
make replace
This command causes your locally produced results to be copied into your ueresults directory. Only results which have changed (or are brand new) will be copied; unchanged results for existing tests will be ignored.
If you wish to replace the results for a single test, you would
../../txtest/replaceresults.sh -t alloc-cxx
(There is an alias called 'replace' in the test.aliases file, so once again you would not have to type all of the above.)
Note that if you are using make replace or 'replaceresults.sh' to replace results which have changed due to changes you've made to the code, you should let Dave Wade-Stein (dws@…) know which results have been changed as a result of your code changes.
Epilogue, Afterword, and Conclusion
PLEASE BE SURE YOU RUN THE COMPLETE UETESTS SUITE BEFORE COMMITTING ANY NEW CODE!
