Skip to content

Commit

Permalink
[travis] Traceback for python tests on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 15, 2017
1 parent c2162b0 commit fc561d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .ci/travis/linux/install.sh
Expand Up @@ -54,6 +54,7 @@ CMAKE_FLAGS="
-DWITH_ASTYLE=OFF
-DDISABLE_DEPRECATED=ON
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS}
-DPYTHON_TEST_WRAPPER="timeout -sSIGSEGV 55s"
"

# The following options trigger a minimalized build to
Expand Down
5 changes: 3 additions & 2 deletions cmake/UsePythonTest.cmake
Expand Up @@ -62,11 +62,12 @@ MESSAGE(\"export LD_LIBRARY_PATH=\$ENV{LD_LIBRARY_PATH}\")
")
ENDFOREACH(_in)

SET (PYTHON_TEST_WRAPPER "" CACHE STRING "Wrapper command for python tests (e.g. `timeout -sSIGSEGV 55s` to segfault after 55 seconds)")
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}.cmake "
MESSAGE(\"export PYTHONPATH=\$ENV{PYTHONPATH}\")
MESSAGE(STATUS \"Running ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon}\")
MESSAGE(STATUS \"Running ${PYTHON_TEST_WRAPPER} ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon}\")
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon}
COMMAND ${PYTHON_TEST_WRAPPER} ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon}
RESULT_VARIABLE import_res
)
# Pass the output back to ctest
Expand Down

0 comments on commit fc561d0

Please sign in to comment.