radiasoft / zgoubi

Git repo for zgoubi source code
https://sourceforge.net/projects/zgoubi/
GNU General Public License v2.0
9 stars 3 forks source link

`make test` is more robust, idempotent, and relocatable #75

Closed robnagler closed 5 years ago

robnagler commented 5 years ago

I think this is a better approach to testing. It's better encapsulated and idempotent, which makes it less brittle. @dtabell This fixes the problem you were seeing with missing warmSnake.map.

Inputs and expected output to a test are contained in a single numbered directory (currently, "1"). Cmake was copying src unnecessarily. PARIZ.H is two lines long for the test so created a 1/PARIZ.H that is copied to the source location. warmSnake is downloaded. Running make test twice will not result in a missing warmSnake.map, because the file is always recreated. Removed unnecessary code in CMakeLists.txt as a result, and put all in test driver, that supports multiple test directories. Absolute paths were removed which allows relocating zgoubi directory. Took out the word "integration" as was too long zgoubi-tests is sufficient. Test should be more robust to files missing, etc.

robnagler commented 5 years ago

Travis is passing now so I'll just merge. We need to get fix-rebel-scl merged with these changes