forked from tencentyun/cos-cpp-sdk-v5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_lcov.sh
42 lines (34 loc) · 909 Bytes
/
gen_lcov.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
workspace=`pwd`
EXTRACT="${workspace}/*/op/* ${workspace}/*/util/* ${workspace}/*/request/* ${workspace}/*/response/* ${workspace}/include"
# clear
rm UTReport -rf
rm UTResport.tar
mkdir -p build
cd build
cmake -DENABLE_COVERAGE=ON ..
gmake all
# init
cd ..
lcov -d build -z
lcov -d build -b . --no-external --initial -c -o sevenyou_init.info
# run
cd build/bin
./auth_tool_test
./object_request_test
./object_op_test
./bucket_op_test
# second
cd ../..
lcov -d build -b . --no-external -c -o sevenyou.info
# filt
lcov --extract sevenyou_init.info ${EXTRACT} -o sevenyou_init_filted.info
lcov --extract sevenyou.info ${EXTRACT} -o sevenyou_filted.info
# genhtml and zip
genhtml -o UTReport --prefix=`pwd` sevenyou_init_filted.info sevenyou_filted.info
tar -cvf UTReport.tar UTReport
rm sevenyou_init.info
rm sevenyou_init_filted.info
rm sevenyou.info
rm sevenyou_filted.info
rm UTReport -rf