-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add external ringtest to CTest suite #997
Conversation
This suppresses a rather verbose message: /usr/bin/which: no xcrun in (...long list of paths...)
This is conditional on the NEURON tests being enabled. This is likely to be a sensible setup for developers working on NEURON and CoreNEURON.
Previously multiple jobs would try to write to the same `.coverage` file, causing a data race and job failures if the tests were run in parallel. This forces each job to write to a separate output file.
Add several CMake helpers (nrn_add_test_group, nrn_add_test, nrn_add_test_group_comparison) and use them to integrate tests from the external neuronsimulator/ringtest repository into the CTest suite of NEURON. NEURON and CoreNEURON are run in several configurations and the results are compared against each other and a reference file. Note that, because of small numerical differences when TABLE statements are removed for CoreNEURON compatibility, the tests are not run if neither CoreNEURON nor NRN_ENABLE_MOD_COMPATIBILITY is enabled.
Many lines in this file had already been touched in recent commits.
- Support older (v3.8.2) CMake versions. - Fix a trivial error in a coverage report filename, fixing parallel runs of some tests. - Add more workarounds for issues with Python in MPI tests, which seem to be related to #894. - Fix dependencies of test targets. - Disable {Python, MPI} tests when those features are disabled. - Use the CORENEURONLIB environment variable so tests run reliably from working directories that are *not* where `nrnivmodl` was run. - Make {build_dir}/bin/nrnivmodl executable, previously it was only made executable when it was installed.
5c80c46
to
79c9965
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very Nice! 👌
I have few comments. We can discuss some of the details offline.
Codecov Report
@@ Coverage Diff @@
## master #997 +/- ##
==========================================
+ Coverage 27.31% 27.37% +0.05%
==========================================
Files 574 574
Lines 109074 109072 -2
==========================================
+ Hits 29790 29854 +64
+ Misses 79284 79218 -66
Continue to review full report at Codecov.
|
- Remove some unnecessary $ENV{SHELL} now nrnivmodl is executable in the build directory. - Reorganise some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great from a user perspective. I'm getting
100% tests passed, 0 tests failed out of 38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Remove extraneous Python imports and tweak a comment.
* Add external `ringtest` to CTest suite. - Add several CMake helpers (nrn_add_test_group, nrn_add_test, nrn_add_test_group_comparison) and use them to integrate tests from the external neuronsimulator/ringtest repository into the CTest suite of NEURON. - NEURON and CoreNEURON are run in several configurations and the results are compared against each other and a reference file. Note that, because of small numerical differences when TABLE statements are removed for CoreNEURON compatibility, the tests are not run if neither CoreNEURON nor NRN_ENABLE_MOD_COMPATIBILITY is enabled. * Replace `which` with `command -v`. This suppresses a rather verbose message: /usr/bin/which: no xcrun in (...long list of paths...) * Run CoreNEURON tests if it is built as a submodule. This is conditional on the NEURON tests being enabled. This is likely to be a sensible setup for developers working on NEURON and CoreNEURON. * Allow code coverage jobs to run in parallel. Previously multiple jobs would try to write to the same `.coverage` file, causing a data race and job failures if the tests were run in parallel. This forces each job to write to a separate output file. * cmake-format the remainder of test/CMakeLists.txt
* Add external `ringtest` to CTest suite. - Add several CMake helpers (nrn_add_test_group, nrn_add_test, nrn_add_test_group_comparison) and use them to integrate tests from the external neuronsimulator/ringtest repository into the CTest suite of NEURON. - NEURON and CoreNEURON are run in several configurations and the results are compared against each other and a reference file. Note that, because of small numerical differences when TABLE statements are removed for CoreNEURON compatibility, the tests are not run if neither CoreNEURON nor NRN_ENABLE_MOD_COMPATIBILITY is enabled. * Replace `which` with `command -v`. This suppresses a rather verbose message: /usr/bin/which: no xcrun in (...long list of paths...) * Run CoreNEURON tests if it is built as a submodule. This is conditional on the NEURON tests being enabled. This is likely to be a sensible setup for developers working on NEURON and CoreNEURON. * Allow code coverage jobs to run in parallel. Previously multiple jobs would try to write to the same `.coverage` file, causing a data race and job failures if the tests were run in parallel. This forces each job to write to a separate output file. * cmake-format the remainder of test/CMakeLists.txt
The addition in this PR is the set of
nrn_add_test*(...)
CMake helpers, which are used to configure integration tests from https://github.com/neuronsimulator/ringtest as part of the CTest suite. These helpers are documented incmake/NeuronTestHelper.cmake
. Note that, because of small numerical differences whenTABLE
statements are removed for CoreNEURON compatibility, theringtest
tests are not run if neither CoreNEURON norNRN_ENABLE_MOD_COMPATIBILITY
is enabled.This PR also enables the CoreNEURON CTest suite if the NEURON CTests are enabled and CoreNEURON is built as a submodule. This means all the tests can be run with a single
make test
in this configuration, which is likely to be a sensible setup for developers working on NEURON and CoreNEURON.Minor other changes:
which
withcommand -v
to suppress a rather verbose message (/usr/bin/which: no xcrun in (...long list of paths...)
)cmake-format
the remainder oftest/CMakeLists.txt
as many lines were already touched in this PR.make test ARGS='-j 8'
), previously there was a data race due to multiple jobs writing the same output file.