Skip to content

Instantly share code, notes, and snippets.

@robertodr
Last active January 14, 2020 22:35
Show Gist options
  • Save robertodr/5dcc34559d537417e36a95445acd2f4c to your computer and use it in GitHub Desktop.
Save robertodr/5dcc34559d537417e36a95445acd2f4c to your computer and use it in GitHub Desktop.
Update to runtest v2
  1. Compile LSDALTON.
  2. Select a test (e.g. ddynam). Tests that use v1 of runtest are declared using the CMake macro add_lsdalton_runtest_v1. Choose one and cd to its folder.
  3. Run it with ./test -b /build/folder
  4. Edit the test script:
    • Adjust imports. Screenshot from 2020-01-14 23-21-57
    • Declare filters as a list not an object. Screenshot from 2020-01-14 23-24-27
    • Run the tests, looping over lists of inputs if necessary. Accumulate the exit code into the ierr variable. Screenshot from 2020-01-14 23-24-27
  5. Rename the result folder to reference: git mv result reference
  6. Re-run to check that everything worked. You might have to change some of the filters. See runtest v2 own docs
  7. Hook up to CMake. Open CMakeLists.txt and change from add_lsdalton_runtest_v1 to add_lsdalton_runtest.
  8. Go back to the build folder, run make and ctest -L <name-of-test> to check that everything works.
  9. git checkout -b runtest-v2, git add, git commit -m "Move test <name-of-test> to runtest v2", git push.
  10. Open a MR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment