Skip to content
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

Allow parallel test coverage (e.g. ctest -j 8 ) #3162

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

nrnhines
Copy link
Member

ctest on my machine takes 5.7 minutes Parallel testing with, e.g. ctest -j 8 takes less that 1.5 minutes. (it would be faster but a few of the test times are 69, 64, 40s). Anyway, this PR allows use of parallel ctest when coverage is enabled.

Example:

cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug -DNRN_ENABLE_TESTS=ON -DNRN_ENABLE_PERFORMANCE_TESTS=OFF -DNRN_ENABLE_COVERAGE=ON -DNRN_COVERAGE_FILES="src/nrncvode/cvodeobj.cpp;src/nrncvode/netcvode.cpp;src/nrncvode/nrndaspk.cpp;src/nrnmpi/mpispike.cpp"

ninja install
ninja cover_begin
ctest -j 8
ninja cover_html

@nrnhines nrnhines requested a review from alkino October 30, 2024 15:42
Copy link

sonarcloud bot commented Oct 30, 2024

@alkino
Copy link
Member

alkino commented Oct 30, 2024

Great addition, I didn't know this flag.

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.17%. Comparing base (d52f6ae) to head (d5cef02).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3162      +/-   ##
==========================================
- Coverage   67.17%   67.17%   -0.01%     
==========================================
  Files         573      573              
  Lines      111436   111436              
==========================================
- Hits        74855    74854       -1     
- Misses      36581    36582       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

✔️ d5cef02 -> Azure artifacts URL

@nrnhines nrnhines merged commit a6510fe into master Oct 30, 2024
36 checks passed
@nrnhines nrnhines deleted the hines/cover-parallel branch October 30, 2024 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants