mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge pull request #1235 from GiudGiud/PR_cov_cpp
Add coverage of c++ source files using cpp-coveralls
This commit is contained in:
commit
28b667ae1a
4 changed files with 13 additions and 2 deletions
|
|
@ -53,4 +53,5 @@ before_script:
|
|||
script:
|
||||
- ./tools/ci/travis-script.sh
|
||||
after_success:
|
||||
- coveralls
|
||||
- cpp-coveralls -i src -i include --exclude-pattern "/usr/*" --dump cpp_cov.json
|
||||
- coveralls --merge=cpp_cov.json
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@ if(optimize)
|
|||
list(REMOVE_ITEM cxxflags -O2)
|
||||
list(APPEND cxxflags -O3)
|
||||
endif()
|
||||
if(coverage)
|
||||
list(APPEND cxxflags --coverage)
|
||||
list(APPEND ldflags --coverage)
|
||||
endif()
|
||||
|
||||
# Show flags being used
|
||||
message(STATUS "OpenMC C++ flags: ${cxxflags}")
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ def install(omp=False, mpi=False, phdf5=False, dagmc=False):
|
|||
if dagmc:
|
||||
cmake_cmd.append('-Ddagmc=ON')
|
||||
|
||||
# Build in coverage mode for coverage testing
|
||||
cmake_cmd.append('-Dcoverage=on')
|
||||
|
||||
# Build and install
|
||||
cmake_cmd.append('..')
|
||||
print(' '.join(cmake_cmd))
|
||||
|
|
|
|||
|
|
@ -25,5 +25,8 @@ python tools/ci/travis-install.py
|
|||
# Install Python API in editable mode
|
||||
pip install -e .[test,vtk]
|
||||
|
||||
# For uploading to coveralls
|
||||
# For coverage testing of the C++ source files
|
||||
pip install cpp-coveralls
|
||||
|
||||
# For coverage testing of the Python source files
|
||||
pip install coveralls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue