Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add combine and testname options #40

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ninja
# Run unit tests
ctest

# Run fastcov with smart branch filtering, as well as system header (/usr/include) and test file filtering
${BASE_DIR}/fastcov.py --gcov gcov-9 --branch-coverage --exclude /usr/include test/ --lcov -o example.info
# Run fastcov with smart branch filtering, as well as system header (/usr/include) and cmake project test file filtering
${BASE_DIR}/fastcov.py -t ExampleTest --gcov gcov-9 --branch-coverage --exclude /usr/include cmake_project/test/ --lcov -o example.info

# Generate report with lcov's genhtml
genhtml --branch-coverage example.info -o coverage_report
Expand Down
318 changes: 231 additions & 87 deletions fastcov.py

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions test/functional/expected_results/combine1.expected.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp
FN:3,_Z3foob
FNDA:1,_Z3foob
FNF:1
FNH:1
BRDA:7,0,0,1000
BRDA:7,0,1,1
BRDA:10,0,0,0
BRDA:10,0,1,1000
BRF:4
BRH:3
DA:3,1
DA:5,1
DA:7,1001
DA:8,1000
DA:10,1000
DA:11,0
DA:14,1
LF:7
LH:6
end_of_record
TN:FunctionalTest1
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp
FN:3,_Z3foob
FNDA:1,_Z3foob
FNF:1
FNH:1
DA:3,1
DA:5,1
DA:7,1001
DA:8,1000
DA:10,1000
DA:11,0
DA:14,1
LF:7
LH:6
end_of_record
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp
FN:3,_Z3barbii
FNDA:10,_Z3barbii
FNF:1
FNH:1
BRDA:5,0,0,10
BRDA:5,0,1,0
BRF:2
BRH:1
DA:3,10
DA:5,10
DA:6,10
DA:8,0
LF:4
LH:3
end_of_record
TN:FunctionalTest1
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp
FN:3,_Z3barbii
FNDA:10,_Z3barbii
FNF:1
FNH:1
DA:3,10
DA:5,10
DA:6,10
DA:8,0
LF:4
LH:3
end_of_record
39 changes: 39 additions & 0 deletions test/functional/expected_results/combine2.expected.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp
FN:3,_Z3foob
FNDA:1,_Z3foob
FNF:1
FNH:1
BRDA:7,0,0,1000
BRDA:7,0,1,1
BRDA:10,0,0,0
BRDA:10,0,1,1000
BRF:4
BRH:3
DA:3,1
DA:5,1
DA:7,1001
DA:8,1000
DA:10,1000
DA:11,0
DA:14,1
LF:7
LH:6
end_of_record
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp
FN:3,_Z3barbii
FNDA:10,_Z3barbii
FNF:1
FNH:1
BRDA:5,0,0,10
BRDA:5,0,1,0
BRF:2
BRH:1
DA:3,10
DA:5,10
DA:6,10
DA:8,0
LF:4
LH:3
end_of_record
44 changes: 44 additions & 0 deletions test/functional/expected_results/combine3.expected.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp
FN:3,_Z3foob
FN:55,_Z3barb
FNDA:1,_Z3barb
FNDA:2,_Z3foob
FNF:2
FNH:2
BRDA:7,0,0,2000
BRDA:7,0,1,2
BRDA:10,0,0,0
BRDA:10,0,1,2000
BRDA:71,0,0,5
BRDA:71,0,1,5
BRF:6
BRH:5
DA:3,2
DA:5,2
DA:7,2002
DA:8,2000
DA:10,2000
DA:11,0
DA:14,2
DA:58,10
LF:8
LH:7
end_of_record
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp
FN:3,_Z3barbii
FNDA:20,_Z3barbii
FNF:1
FNH:1
BRDA:5,0,0,20
BRDA:5,0,1,0
BRF:2
BRH:1
DA:3,20
DA:5,20
DA:6,20
DA:8,0
LF:4
LH:3
end_of_record
44 changes: 44 additions & 0 deletions test/functional/expected_results/combine3a.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp
FN:3,_Z3foob
FN:55,_Z3barb
FNDA:1,_Z3foob
FNDA:1,_Z3barb
FNF:1
FNH:1
BRDA:10,0,0,0
BRDA:10,0,1,1000
BRDA:7,0,0,1000
BRDA:7,0,1,1
BRDA:71,0,0,5
BRDA:71,0,1,5
BRF:4
BRH:3
DA:10,1000
DA:11,0
DA:14,1
DA:3,1
DA:5,1
DA:7,1001
DA:8,1000
DA:58,10
LF:7
LH:6
end_of_record
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp
FN:3,_Z3barbii
FNDA:10,_Z3barbii
FNF:1
FNH:1
BRDA:5,0,0,10
BRDA:5,0,1,0
BRF:2
BRH:1
DA:3,10
DA:5,10
DA:6,10
DA:8,0
LF:4
LH:3
end_of_record
39 changes: 39 additions & 0 deletions test/functional/expected_results/combine3b.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source1.cpp
FN:3,_Z3foob
FNDA:1,_Z3foob
FNF:1
FNH:1
BRDA:10,0,0,0
BRDA:10,0,1,1000
BRDA:7,0,0,1000
BRDA:7,0,1,1
BRF:4
BRH:3
DA:10,1000
DA:11,0
DA:14,1
DA:3,1
DA:5,1
DA:7,1001
DA:8,1000
LF:7
LH:6
end_of_record
TN:
SF:/mnt/workspace/test/functional/cmake_project/src/source2.cpp
FN:3,_Z3barbii
FNDA:10,_Z3barbii
FNF:1
FNH:1
BRDA:5,0,0,10
BRDA:5,0,1,0
BRF:2
BRH:1
DA:3,10
DA:5,10
DA:6,10
DA:8,0
LF:4
LH:3
end_of_record
Loading