Foreign ctest: portable suite against wheels and install prefixes - #3829
Open
nrnhines wants to merge 13 commits into
Open
Foreign ctest: portable suite against wheels and install prefixes#3829nrnhines wants to merge 13 commits into
nrnhines wants to merge 13 commits into
Conversation
Record approved design for a separate test-only CMake project that runs integration tests against a pip-installed NEURON wheel (neuron-nightly).
Add standalone test/foreign CMake project that probes a pip-installed NEURON wheel, enforces version policy D, and runs serial smoke tests (import, nrniv, neuron.test) without building libnrniv.
Parameterize NeuronTestHelper for foreign/wheel installs (source root, nrnivmodl path, no libnrniv depends). Register test/pytest via wheel nrnivmodl and wire target foreign to build special + test scripts.
Register smoke, pytest, datahandle, cover, unit, example_nmodl, hoctests, ringtest, connect_dend, rxd, and serial gjtests against a wheel install. Document local neuron-nightly workflow (metric C); label tests for -L serial.
Register mpiexec-backed parallel tests and CoreNEURON CPU (plus CN+MPI) groups when the foreign wheel and host tools support them. Label suites for ctest -L mpi / -L coreneuron; skip cleanly without mpiexec.
Document foreign-ok vs build-only tests; refine git-SHA matching for nightlies; defend missing config keys; optional NRN_FOREIGN_ROOT prefix PATH; configure-time test counts. No Azure job (out of scope).
cmake-format / coding-conventions format-pr output required for CI.
Convenience target builds mechanisms (foreign), runs ctest -L serial by default, and always prints how to re-run ctest with full filter control.
NRN_ENABLE_TESTS=ON now adds ninja test-install, which configures test/foreign into build/build-ctest against CMAKE_INSTALL_PREFIX after install. Improve prefix discovery via lib/python on PYTHONPATH.
MPI env rebuild had dropped install lib/python from PYTHONPATH (all Python foreign tests failed). Force-cache site PYTHONPATH on reconfigure. Pass -G CMAKE_GENERATOR so test-install inherits the generator (e.g. Ninja) from the main build.
Expand NRN_ENABLE_TESTS (in-tree vs test-install), wheel testing via test/foreign, and cross-links from install instructions, developer index, coverage, and GPU testing pages.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3829 +/- ##
==========================================
+ Coverage 68.52% 68.53% +0.01%
==========================================
Files 695 695
Lines 111595 111595
==========================================
+ Hits 76465 76480 +15
+ Misses 35130 35115 -15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
✔️ b7b9829 -> artifacts URL |
|
|
✔️ c7660eb -> Azure artifacts URL |
Contributor
|
✔️ c7660eb -> artifacts URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds a standalone foreign CTest harness (
test/foreign) so the portable part of the NEURON suite can run against an already installed NEURON (PyPI wheel or classicCMAKE_INSTALL_PREFIX) without rebuildinglibnrniv.nrniv/nrnivmodl, features vianeuron.config.arguments).-DNRN_FOREIGN_ALLOW_SKEW=ON; CI-style hard fail with-DNRN_FOREIGN_CI=ON.-L serial): smoke, pytest/datahandle/cover, hoctests, example_nmodl, ringtest, rxd, serial gj, etc.mpiexecis available (-L mpi,-L coreneuron).test-installtarget: builds mechanisms, runs default serial check, prints how to re-run fullctest.NRN_ENABLE_TESTS=ON):ninja install && ninja test-installconfigures foreign into${CMAKE_BINARY_DIR}/build-ctestagainstCMAKE_INSTALL_PREFIX(inherits CMake generator, e.g. Ninja).NRN_ENABLE_TESTS, wheel testing, install instructions, developer index; detail intest/foreign/README.mdandINVENTORY.md.Usage sketch
Test plan
neuron-nightlyvenv (serial + MPI + CoreNEURON labels during development)NRN_ENABLE_TESTS=ON,ninja install,ninja test-install(PYTHONPATH toinstall/lib/python)format-pr/ cmake-format on touched CMake and Pythonhoctests::test_neurondemo_pyunder prefix (known noisy stderr from lazy demo nrnivmodl)