You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2019/01/07 12:34:33 UTC
[celix] branch develop updated: CELIX-454: Fixes some issues with
the coverage setup and (for now) removes osx from travis config.
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/develop by this push:
new b862687 CELIX-454: Fixes some issues with the coverage setup and (for now) removes osx from travis config.
b862687 is described below
commit b8626879e6930dfeba78feffcc12b61e9c181bcc
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Mon Jan 7 13:33:14 2019 +0100
CELIX-454: Fixes some issues with the coverage setup and (for now) removes osx from travis config.
The OSX build seems to be stuk on a brew udpate. Some additional investigation is needed.
---
.travis.yml | 8 ++++----
bundles/pubsub/test/CMakeLists.txt | 8 ++++----
cmake/celix_project/CodeCoverage.cmake | 11 +++++++++--
libs/framework/tst/CMakeLists.txt | 4 ++--
4 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 8d2adb4..6c9ac09 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,10 +24,10 @@ matrix:
- os: linux
dist: trusty
compiler: clang
- - os: osx
- osx_image: xcode7.3
- compiler: clang
- env: MACOSX_DEPLOYMENT_TARGET=10.11
+ # - os: osx
+ #osx_image: xcode7.3
+ #compiler: clang
+ #env: MACOSX_DEPLOYMENT_TARGET=10.11
- os: linux
dist: trusty
compiler: gcc
diff --git a/bundles/pubsub/test/CMakeLists.txt b/bundles/pubsub/test/CMakeLists.txt
index 2d7130e..0bb3be1 100644
--- a/bundles/pubsub/test/CMakeLists.txt
+++ b/bundles/pubsub/test/CMakeLists.txt
@@ -67,8 +67,8 @@ add_celix_container(pubsub_udpmc_tests
)
target_link_libraries(pubsub_udpmc_tests PRIVATE Celix::pubsub_api ${CPPUTEST_LIBRARIES} ${JANSSON_LIBRARIES} Celix::dfi)
target_include_directories(pubsub_udpmc_tests PRIVATE ${CPPUTEST_INCLUDE_DIR})
-add_test(NAME run_pubsub_udpmc_tests COMMAND pubsub_udpmc_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_udpmc_tests,CONTAINER_LOC>)
-SETUP_TARGET_FOR_COVERAGE(pubsub_udpmc_tests pubsub_udpmc_tests ${CMAKE_BINARY_DIR}/coverage/pubsub/pubsub_udpmc)
+add_test(NAME pubsub_udpmc_tests COMMAND pubsub_udpmc_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_udpmc_tests,CONTAINER_LOC>)
+SETUP_TARGET_FOR_COVERAGE(pubsub_udpmc_tests_cov pubsub_udpmc_tests ${CMAKE_BINARY_DIR}/coverage/pubsub_udpmc_tests/pubsub_udpmc_tests ..)
if (BUILD_PUBSUB_PSA_ZMQ)
add_celix_container(pubsub_zmq_tests
@@ -86,6 +86,6 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_zmq_tests PRIVATE Celix::pubsub_api ${CPPUTEST_LIBRARIES} ${JANSSON_LIBRARIES} Celix::dfi)
target_include_directories(pubsub_zmq_tests PRIVATE ${CPPUTEST_INCLUDE_DIR})
- add_test(NAME run_pubsub_zmq_tests COMMAND pubsub_zmq_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_tests,CONTAINER_LOC>)
- SETUP_TARGET_FOR_COVERAGE(pubsub_zmq_tests pubsub_zmq_tests ${CMAKE_BINARY_DIR}/coverage/pubsub/pubsub_zmq)
+ add_test(NAME pubsub_zmq_tests COMMAND pubsub_zmq_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_tests,CONTAINER_LOC>)
+ SETUP_TARGET_FOR_COVERAGE(pubsub_zmq_tests_cov pubsub_zmq_tests ${CMAKE_BINARY_DIR}/coverage/pubsub_zmq_tests/pubsub_zmq_tests ..)
endif ()
\ No newline at end of file
diff --git a/cmake/celix_project/CodeCoverage.cmake b/cmake/celix_project/CodeCoverage.cmake
index 51b5001..98b4ca3 100644
--- a/cmake/celix_project/CodeCoverage.cmake
+++ b/cmake/celix_project/CodeCoverage.cmake
@@ -103,6 +103,13 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
ENDIF() # NOT GENHTML_PATH
+ set(SCAN_DIR ".")
+ if (NOT ARGV3)
+ set(SCAN_DIR ".")
+ else()
+ set(SCAN_DIR "${ARGV3}")
+ endif ()
+
# Setup target
ADD_CUSTOM_TARGET(${_targetname}_coverage
@@ -115,8 +122,8 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
# Capturing lcov counters and generating report
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/coverage
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/coverage/${_testrunner}
- COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
- COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'mock/*' 'test/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+ COMMAND ${LCOV_PATH} --directory ${SCAN_DIR} --capture --output-file ${_outputname}.info
+ COMMAND ${LCOV_PATH} --remove ${_outputname}.info '**/mock/*' '**/test/*' '**/gtest/*' '**/tst/*' '**/celix/gen/*' '**/googletest_project/*' '**/glog/*' '/usr/*' --output-file ${_outputname}.info.cleaned
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
diff --git a/libs/framework/tst/CMakeLists.txt b/libs/framework/tst/CMakeLists.txt
index 48f0d05..9b7dd97 100644
--- a/libs/framework/tst/CMakeLists.txt
+++ b/libs/framework/tst/CMakeLists.txt
@@ -36,6 +36,6 @@ configure_file(config.properties.in config.properties @ONLY)
configure_file(framework1.properties.in framework1.properties @ONLY)
configure_file(framework2.properties.in framework2.properties @ONLY)
-add_test(NAME run_test_framework COMMAND test_framework)
-SETUP_TARGET_FOR_COVERAGE(test_framework_cov test_framework ${CMAKE_BINARY_DIR}/coverage/test_framework/test_framework)
+add_test(NAME test_framework COMMAND test_framework)
+SETUP_TARGET_FOR_COVERAGE(test_framework_cov test_framework ${CMAKE_BINARY_DIR}/coverage/test_framework/test_framework ..)