Skip to content
Snippets Groups Projects
Commit bac373c5 authored by René Fritze's avatar René Fritze
Browse files

[travis] rewire ctest calls

this builds and runs tests w/o ctest first. Errors here will and should
fail our travis build as such. Afterwards ctest is run again on a
cleaned build dir. This should replicate results and submit those to
cdash, while enabling us not to have the travis build fail due to ctest
itself failing.
parent ff70b3c4
No related branches found
No related tags found
No related merge requests found
......@@ -63,20 +63,24 @@ before_install:
# command to install dependencies
install:
- cd $HOME/src
- pip install --user cpp-coveralls
- grep -R $HOME/src/dune-grid ${DUNE_BUILD_DIR} || echo no $HOME/src/dune-grid pre-make
- pip install --user cpp-coveralls
- ./dune-common/bin/dunecontrol ${DCONTROL_ARG} all
- grep -R $HOME/src/dune-grid ${DUNE_BUILD_DIR} || echo no $HOME/src/dune-grid post-make
- ./dune-common/bin/dunecontrol ${DCONTROL_ARG} make install > /dev/null
- grep -R $HOME/src/dune-grid ${DUNE_BUILD_DIR} || echo no $HOME/src/dune-grid post-install
- rm -rf ${DUNE_BUILD_DIR} $HOME/src
# # command to run tests
script:
- cd ${TRAVIS_BUILD_DIR}
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff configure
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec ctest --output-on-failure -S ${TRAVIS_BUILD_DIR}/.travis.ctest
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec make
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec make test_binaries
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec make test
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec make headercheck -k
# reset for ctest
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec make clean
- export CTEST_ARG="--output-on-failure -S ${TRAVIS_BUILD_DIR}/.travis.ctest"
# ctest errors on coverage gathering, this should NOT fail our entire build
- ~/dune/bin/dunecontrol ${DCONTROL_ARG} --only=dune-stuff bexec ctest ${CTEST_ARG} || echo "CTest Failed"
notifications:
email:
......
......@@ -113,6 +113,7 @@ set( DUNE_TEST_TIMEOUT 180 CACHE STRING "per-test timeout in seconds")
include(CTest)
macro(BEGIN_TESTCASES)
# https://cmake.org/cmake/help/v3.0/module/FindGTest.html
include_directories(SYSTEM ${DUNE_STUFF_TEST_DIR}/gtest )
add_library(gtest_dune_stuff STATIC ${DUNE_STUFF_TEST_DIR}/gtest/gtest-all.cc)
target_link_libraries(gtest_dune_stuff pthread)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment