Skip to content

Commit bf96da7

Browse files
committed
WIP vol. X
1 parent b0cd536 commit bf96da7

6 files changed

Lines changed: 12 additions & 8 deletions

File tree

native/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ ELSE()
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")
1818
ENDIF()
1919

20+
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
21+
2022
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/modules)
2123
SET(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
2224
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})

native/balancers/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ADD_LIBRARY(mod_lbmethod_cluster MODULE ${MOD_PROXY_CLUSTER_SRCS})
2121
SET_TARGET_PROPERTIES(mod_lbmethod_cluster PROPERTIES PREFIX "")
2222
SET_TARGET_PROPERTIES(mod_lbmethod_cluster PROPERTIES SUFFIX ".so")
2323
IF(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})
2525
ELSE()
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})
2727
ENDIF()

native/mod_manager/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SET_TARGET_PROPERTIES(mod_manager PROPERTIES PREFIX "")
2929
SET_TARGET_PROPERTIES(mod_manager PROPERTIES SUFFIX ".so")
3030

3131
IF(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})
3333
ELSE()
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})
3535
ENDIF()

native/mod_proxy_cluster/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ADD_LIBRARY(mod_proxy_cluster MODULE ${MOD_PROXY_CLUSTER_SRCS})
2121
SET_TARGET_PROPERTIES(mod_proxy_cluster PROPERTIES PREFIX "")
2222
SET_TARGET_PROPERTIES(mod_proxy_cluster PROPERTIES SUFFIX ".so")
2323
IF(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})
2525
ELSE()
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})
2727
ENDIF()

test/httpd/Containerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ RUN rm -rf /test/httpd/mod_proxy_cluster
4343
FROM fedora:42
4444

4545
ENV CONF=httpd/mod_proxy_cluster.conf
46+
ENV GCOV_PREFIX=/coverage
47+
ENV GCOV_PREFIX_STRIP=3
4648

4749
RUN dnf install pcre apr-util wcstools gcovr lcov -y
4850

test/includes/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)