Skip to content
Snippets Groups Projects
Commit cf49aefe authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Refs #11832. All of framework except SINQ covered.

parent 97f0a67d
No related merge requests found
......@@ -59,11 +59,22 @@ if (NOT PROJECT_ROOT)
message(FATAL_ERROR "Coveralls: Missing PROJECT_ROOT.")
endif()
file(READ "sources.txt" COVERAGE_SRCS)
string(REGEX REPLACE "\n" ";" COVERAGE_SRCS ${COVERAGE_SRCS})
string(STRIP "${COVERAGE_SRCS}" COVERAGE_SRCS)
foreach(ITEM ${COVERAGE_SRCS})
message(STATUS "ITEM:${ITEM}")
endforeach()
message(STATUS "${COVERAGE_SRCS}")
# Since it's not possible to pass a CMake list properly in the
# "1;2;3" format to an external process, we have replaced the
# ";" with "*", so reverse that here so we get it back into the
# CMake list format.
string(REGEX REPLACE "\\*" ";" COVERAGE_SRCS ${COVERAGE_SRCS})
#string(REGEX REPLACE "\\*" ";" COVERAGE_SRCS ${COVERAGE_SRCS})
find_program(GCOV_EXECUTABLE gcov)
......
......@@ -207,8 +207,16 @@ add_subdirectory ( Testing/SystemTests/scripts )
if (COVERALLS)
get_property(ALL_SRCS GLOBAL PROPERTY COVERAGE_SRCS)
set(SRCS_FILE "")
foreach (SRC ${ALL_SRCS})
set(SRCS_FILE "${SRCS_FILE}\n${SRC}")
endforeach()
#remove initial \n
string(SUBSTRING ${SRCS_FILE} 1 -1 SRCS_FILE)
set( SRCS_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/sources.txt")
file(WRITE ${SRCS_FILENAME} ${SRCS_FILE})
coveralls_setup(
"${ALL_SRCS}"
${SRCS_FILENAME}
OFF
"${CMAKE_SOURCE_DIR}/Build/CMake"
)
......
......@@ -405,7 +405,6 @@ set ( GMOCK_TEST_FILES
if (COVERALLS)
foreach( loop_var ${SRC_FILES} ${INC_FILES} )
message(STATUS "loop_var:${loop_var}")
set_property(GLOBAL APPEND PROPERTY COVERAGE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
endforeach(loop_var)
endif()
......
......@@ -130,11 +130,11 @@ set ( TEST_FILES
UncertainValueTest.h
)
if (COVERALLS)
foreach( loop_var ${SRC_FILES} ${INC_FILES})
set_property(GLOBAL APPEND PROPERTY COVERAGE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
endforeach(loop_var)
endif()
#if (COVERALLS)
# foreach( loop_var ${SRC_FILES} ${INC_FILES})
# set_property(GLOBAL APPEND PROPERTY COVERAGE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
# endforeach(loop_var)
#endif()
# Add a precompiled header where they are supported
enable_precompiled_headers ( inc/MantidSINQ/PrecompiledHeader.h SRC_FILES )
......
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