diff options
| author | John Szakmeister <john@szakmeister.net> | 2015-03-21 09:47:49 -0400 |
|---|---|---|
| committer | John Szakmeister <john@szakmeister.net> | 2015-03-21 09:47:49 -0400 |
| commit | afae3e25d5fb284482cec7bbc64cb14f4157d6fa (patch) | |
| tree | 0c88961c2179faf9f4afed5db4e3008f7e197717 /cmake | |
| parent | 4fc0291c730f3c42df4692dd91b09cfd806479d7 (diff) | |
| download | rneovim-afae3e25d5fb284482cec7bbc64cb14f4157d6fa.tar.gz rneovim-afae3e25d5fb284482cec7bbc64cb14f4157d6fa.tar.bz2 rneovim-afae3e25d5fb284482cec7bbc64cb14f4157d6fa.zip | |
build: add support for running the tests in junit format
This requires a couple of extra modules that are not installed by
default, and it requires capturing stdout of the tests--otherwise CMake
output is intermixed with the XML output of busted.
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/RunTests.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake index a4330a58de..6262cbc383 100644 --- a/cmake/RunTests.cmake +++ b/cmake/RunTests.cmake @@ -13,13 +13,18 @@ else() set(TEST_PATH "${TEST_DIR}/${TEST_TYPE}") endif() +if(BUSTED_OUTPUT_TYPE STREQUAL junit) + set(EXTRA_ARGS OUTPUT_FILE ${BUILD_DIR}/${TEST_TYPE}test-junit.xml) +endif() + execute_process( COMMAND ${BUSTED_PRG} -v -o ${BUSTED_OUTPUT_TYPE} --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua --lpath=${BUILD_DIR}/?.lua ${TEST_PATH} WORKING_DIRECTORY ${WORKING_DIR} ERROR_VARIABLE err - RESULT_VARIABLE res) + RESULT_VARIABLE res + ${EXTRA_ARGS}) if(NOT res EQUAL 0) message(STATUS "Output to stderr:\n${err}") |