File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -p -std=gnu99 -fPIC -Wall -Wextra --coverage -fprofile-arcs -ftest-coverage -fPIC -O0 -lgcov" )
1818ENDIF ()
1919
20+ SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage" )
21+
2022SET (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR} /modules)
2123SET (PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR} /include)
2224SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake/modules ${CMAKE_MODULE_PATH} )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ADD_LIBRARY(mod_lbmethod_cluster MODULE ${MOD_PROXY_CLUSTER_SRCS})
2121SET_TARGET_PROPERTIES (mod_lbmethod_cluster PROPERTIES PREFIX "" )
2222SET_TARGET_PROPERTIES (mod_lbmethod_cluster PROPERTIES SUFFIX ".so" )
2323IF (WIN32 )
24- TARGET_LINK_LIBRARIES (mod_lbmethod_cluster mod_proxy_cluster_common ${PROXY_LIBRARY} ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
24+ TARGET_LINK_LIBRARIES (mod_lbmethod_cluster $< TARGET_OBJECTS : mod_proxy_cluster_common > ${PROXY_LIBRARY} ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
2525ELSE ()
26- TARGET_LINK_LIBRARIES (mod_lbmethod_cluster mod_proxy_cluster_common ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
26+ TARGET_LINK_LIBRARIES (mod_lbmethod_cluster $< TARGET_OBJECTS : mod_proxy_cluster_common > ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
2727ENDIF ()
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ SET_TARGET_PROPERTIES(mod_manager PROPERTIES PREFIX "")
2929SET_TARGET_PROPERTIES (mod_manager PROPERTIES SUFFIX ".so" )
3030
3131IF (WIN32 )
32- TARGET_LINK_LIBRARIES (mod_manager mod_proxy_cluster_common ${PROXY_LIBRARY} ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
32+ TARGET_LINK_LIBRARIES (mod_manager $< TARGET_OBJECTS : mod_proxy_cluster_common > ${PROXY_LIBRARY} ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
3333ELSE ()
34- TARGET_LINK_LIBRARIES (mod_manager mod_proxy_cluster_common ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
34+ TARGET_LINK_LIBRARIES (mod_manager $< TARGET_OBJECTS : mod_proxy_cluster_common > ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
3535ENDIF ()
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ADD_LIBRARY(mod_proxy_cluster MODULE ${MOD_PROXY_CLUSTER_SRCS})
2121SET_TARGET_PROPERTIES (mod_proxy_cluster PROPERTIES PREFIX "" )
2222SET_TARGET_PROPERTIES (mod_proxy_cluster PROPERTIES SUFFIX ".so" )
2323IF (WIN32 )
24- TARGET_LINK_LIBRARIES (mod_proxy_cluster mod_proxy_cluster_common ${PROXY_LIBRARY} ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
24+ TARGET_LINK_LIBRARIES (mod_proxy_cluster $< TARGET_OBJECTS : mod_proxy_cluster_common > ${PROXY_LIBRARY} ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
2525ELSE ()
26- TARGET_LINK_LIBRARIES (mod_proxy_cluster mod_proxy_cluster_common ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
26+ TARGET_LINK_LIBRARIES (mod_proxy_cluster $< TARGET_OBJECTS : mod_proxy_cluster_common > ${APR_LIBRARIES} ${APRUTIL_LIBRARIES} ${APACHE_LIBRARY} )
2727ENDIF ()
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ RUN rm -rf /test/httpd/mod_proxy_cluster
4343FROM fedora:42
4444
4545ENV CONF=httpd/mod_proxy_cluster.conf
46+ ENV GCOV_PREFIX=/coverage
47+ ENV GCOV_PREFIX_STRIP=3
4648
4749RUN dnf install pcre apr-util wcstools gcovr lcov -y
4850
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ run_test() {
4343 # docker has problems with names containing spaces
4444 f=$( echo ${2:- 1} | sed ' s/ /-/g' )
4545 docker exec ${httpd_cont} find / -name " *.gcda" -exec stat -c " %d %y" {} \;
46- docker exec ${httpd_cont} sh -c " cd /native ; gcovr --gcov-ignore-errors=no_working_dir_found --json /coverage/coverage-$f .json > /coverage/coverage-$f .log 2>&1"
47- docker exec ${httpd_cont} sh -c " cd /native ; lcov --capture --directory . --output-file /coverage/coverage-$f .info > /coverage/coverage-lcov-$f .log 2>&1"
46+ docker exec ${httpd_cont} sh -c " cd /coverage ; gcovr --gcov-ignore-errors=no_working_dir_found --json /coverage/coverage-$f .json > /coverage/coverage-$f .log 2>&1"
47+ docker exec ${httpd_cont} sh -c " cd /coverage ; lcov --capture --directory . --output-file /coverage/coverage-$f .info > /coverage/coverage-lcov-$f .log 2>&1"
4848
4949 for f in $( docker exec ${httpd_cont} ls /coverage/) ; do
5050 docker cp ${httpd_cont} :/coverage/$f $PWD /coverage/$f > /dev/null
You can’t perform that action at this time.
0 commit comments