Skip to content

Commit

Permalink
Adds app name to file result for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
jdfiguer authored and jdfiguer committed Jan 13, 2024
1 parent 23d4349 commit 4a07ffe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ build
coverage/
lcov/
osal_lcov/
coverage_base.info
coverage_test.info
coverage_total.info
lcov_out.txt
test_results.txt
*_coverage_base.info
*_coverage_test.info
*_coverage_total.info
*_lcov/
*_lcov_out.txt
*_test_results.txt
outputOnFailure.txt
cfe_ut_results.txt
lcov_summary.txt
cfe_lcov_summary.txt
cfe_lcov
6 changes: 3 additions & 3 deletions scripts/cfe_lcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ cd ../time;ctest --verbose >> ../../../cfe_ut_results.txt
cd ../../../..

# calculate coverage
lcov --capture --rc lcov_branch_coverage=1 --directory build --output-file coverage_test.info
lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_base.info --add-tracefile coverage_test.info --output-file coverage_total.info
genhtml coverage_total.info --branch-coverage --output-directory cfe_lcov | tee lcov_summary.txt
lcov --capture --rc lcov_branch_coverage=1 --directory build --output-file cfe_coverage_test.info
lcov --rc lcov_branch_coverage=1 --add-tracefile cfe_coverage_base.info --add-tracefile cfe_coverage_test.info --output-file cfe_coverage_total.info
genhtml coverage_total.info --branch-coverage --output-directory cfe_lcov | tee cfe_lcov_summary.txt
10 changes: 5 additions & 5 deletions scripts/lcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ make -C build/tools/elf2cfetbl
make -C build/native/default_cpu1/apps/$APP_LOWER

# capture initial lcov and run test
lcov --capture --initial --directory build --output-file coverage_base.info
(cd build/native/default_cpu1/apps/$APP_LOWER; ctest --verbose) | tee test_results.txt
lcov --capture --initial --directory build --output-file "${app}_coverage_base.info"
(cd build/native/default_cpu1/apps/$APP_LOWER; ctest --verbose) | tee "${app}_test_results.txt"

# calculate coveage
lcov --capture --rc lcov_branch_coverage=1 --directory build --output-file coverage_test.info
lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_base.info --add-tracefile coverage_test.info --output-file coverage_total.info
genhtml coverage_total.info --branch-coverage --output-directory lcov | tee lcov_out.txt
lcov --capture --rc lcov_branch_coverage=1 --directory build --output-file "${app}_coverage_test.info"
lcov --rc lcov_branch_coverage=1 --add-tracefile "${app}_coverage_base.info" --add-tracefile "${app}_coverage_test.info" --output-file "${app}_coverage_total.info"
genhtml "${app}_coverage_total.info" --branch-coverage --output-directory "${app}_lcov" | tee "${app}_lcov_out.txt"


0 comments on commit 4a07ffe

Please sign in to comment.