Skip to content
Snippets Groups Projects
Verified Commit cee90bed authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: fix coverage

parent 9d72b950
Branches
Tags
No related merge requests found
Pipeline #9844 passed
Pipeline: caosdb-cppinttest

#9845

    ......@@ -55,7 +55,7 @@ add_executable(caosdbcli src/caosdbcli.cpp)
    # linting is active when BUILD_TYPE == "Debug"
    if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
    #set(_LINTING ON)
    set(_LINTING ON)
    endif()
    if(_LINTING)
    find_program(iwyu
    ......
    ......@@ -82,6 +82,11 @@
    # 2021-05-20, Timm Fitschen <t.fitschen@indiscale.com>
    # - Fix: this script should also accept GCC as a (plain) C compiler.
    #
    # 2021-07-05, Timm Fitschen <t.fitschen@indiscale.com>
    # - Removed -fprofile-abs-path again, because it would not work when using
    # gcc as compiler, but clang-tidy as linter. Probably there is a better fix.
    # clang error: `error: unknown argument: '-fprofile-abs-path' [clang-diagnostic-error]`
    #
    # USAGE:
    #
    # 1. Copy this file into your cmake modules path.
    ......@@ -165,13 +170,13 @@ endif()
    set(COVERAGE_COMPILER_FLAGS "-g -fprofile-arcs -ftest-coverage"
    CACHE INTERNAL "")
    if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
    include(CheckCXXCompilerFlag)
    check_cxx_compiler_flag(-fprofile-abs-path HAVE_fprofile_abs_path)
    if(HAVE_fprofile_abs_path)
    set(COVERAGE_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
    endif()
    endif()
    #if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
    #include(CheckCXXCompilerFlag)
    #check_cxx_compiler_flag(-fprofile-abs-path HAVE_fprofile_abs_path)
    #if(HAVE_fprofile_abs_path)
    #set(COVERAGE_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
    #endif()
    #endif()
    set(CMAKE_Fortran_FLAGS_COVERAGE
    ${COVERAGE_COMPILER_FLAGS}
    ......
    ......@@ -115,7 +115,6 @@ SslCaosDBConnectionConfig::SslCaosDBConnectionConfig(
    : CaosDBConnectionConfig(host, port) {
    SslCredentialsOptions options;
    options.pem_root_certs = cacert->getCACertPem();
    std::cout << "HERE" << options.pem_root_certs;
    this->credentials = SslCredentials(options);
    }
    ......@@ -159,7 +158,7 @@ auto operator<<(std::ostream &out, const CaosDBConnection &connection)
    [[nodiscard]] auto CaosDBConnection::getVersionInfo() const
    -> std::unique_ptr<VersionInfo> {
    GetVersionInfoRequest request;
    const GetVersionInfoRequest request;
    GetVersionInfoResponse response;
    grpc::ClientContext context;
    const grpc::Status status =
    ......
    ......@@ -77,6 +77,7 @@ if (LCOV_PATH)
    LCOV_ARGS --rc lcov_branch_coverage=1 --no-external
    GENHTML_ARGS --rc lcov_branch_coverage=1
    )
    message(STATUS "Adding COMPILE_FLAGS for coverage: ${COVERAGE_COMPILER_FLAGS}")
    set_target_properties(caosdb PROPERTIES
    COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}")
    else ()
    ......
    ......@@ -27,7 +27,7 @@
    #include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_EQ
    namespace grpc {
    class ChannelCredentials;
    }
    } // namespace grpc
    namespace caosdb::connection {
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment