Skip to content

Commit 94d41db

Browse files
author
gavinhgchen
committed
修复lcov数据不准确问题
1 parent 541d31b commit 94d41db

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
66
option(BUILD_UNITTEST "Build unittest" OFF)
77
option(BUILD_DEMO "Build demo" ON)
88
option(BUILD_SHARED_LIB "Build shared library" OFF)
9+
option(ENABLE_COVERAGE "Enable Coverage" OFF)
910

1011
if(APPLE)
1112
set(OS_TYPE "APPLE")
@@ -71,6 +72,11 @@ else()
7172
set(SYSTEM_LIBS stdc++ pthread)
7273
endif()
7374

75+
if(ENABLE_COVERAGE)
76+
# coverage option
77+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
78+
endif()
79+
7480
add_subdirectory(src)
7581

7682
if(BUILD_UNITTEST)

gen_lcov.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
workspace=`pwd`
4-
EXTRACT="${workspace}/*/op/* ${workspace}/*/util/* ${workspace}/*/request/* ${workspace}/*/response/* ${workspace}/include"
4+
EXTRACT="${workspace}/src ${workspace}/include"
55
# clear
66
rm UTReport -rf
77
rm UTResport.tar

include/cos_defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace qcloud_cos {
1313

14-
#define COS_CPP_SDK_VERSON "v5.5.9"
14+
#define COS_CPP_SDK_VERSON "v5.5.10"
1515

1616
/// 路径分隔符
1717
const std::string kPathDelimiter = "/";

0 commit comments

Comments
 (0)