Skip to content

Commit

Permalink
Merge branch 'master' into handle_lcov_end_line_number
Browse files Browse the repository at this point in the history
  • Loading branch information
RPGillespie6 authored Dec 7, 2024
2 parents a9f3f39 + 3b0abdb commit 503c9d2
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions fastcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ def parseInfo(path):
}

with open(path) as f:
current_test_name = ""
for line in f:
if line.startswith("TN:"):
current_test_name = line[3:].strip()
Expand Down
29 changes: 29 additions & 0 deletions test/functional/expected_results/combine5.expected.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
TN:
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
DA:3,10
DA:5,10
DA:6,10
DA:8,0
LF:4
LH:3
end_of_record
27 changes: 27 additions & 0 deletions test/functional/expected_results/test1.no_tn.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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
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
4 changes: 4 additions & 0 deletions test/functional/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ cmp combine4.actual.info ${TEST_DIR}/expected_results/combine4.expected.info
coverage run -a ${TEST_DIR}/fastcov.py -C ${TEST_DIR}/expected_results/test1.end_line_number_fn.info --lcov -o test1.end_line_number_fn.actual.info
cmp test1.end_line_number_fn.actual.info ${TEST_DIR}/expected_results/combine6.expected.info

# Combine operation - Missing TN
coverage run -a ${TEST_DIR}/fastcov.py -C ${TEST_DIR}/expected_results/test1.no_tn.info --lcov -o test1.no_tn.actual.info
cmp test1.no_tn.actual.info ${TEST_DIR}/expected_results/combine5.expected.info

# Run ctest_2
${TEST_DIR}/fastcov.py --gcov gcov-9 --zerocounters # Clear previous test coverage
ctest -R ctest_2
Expand Down

0 comments on commit 503c9d2

Please sign in to comment.