|
1 | 1 | **uncov**, _v0.3_, _2016 – 2021_ |
2 | 2 |
|
3 | | -_This file last updated on 26 May, 2021_ |
| 3 | +_This file last updated on 6 June, 2021_ |
4 | 4 |
|
5 | 5 | 1. [Description](#description) |
6 | 6 | 2. [Supported Environment](#supported-environment) |
@@ -80,26 +80,28 @@ Expected to work in Unix-like environments. |
80 | 80 |
|
81 | 81 | ## Usage ## |
82 | 82 |
|
83 | | -GCC 8 and newer (json format of intermediate data isn't handled by `new-gcovi`): |
| 83 | +Using subcommand (should be faster and less problematic): |
| 84 | + |
| 85 | + # drop coverage counters from previous run |
| 86 | + find . -name '*.gcda' -delete |
| 87 | + # << run tests here >> |
| 88 | + # collect coverage (--capture-worktree automatically makes stray commit if |
| 89 | + # worktree is dirty) |
| 90 | + uncov new-gcovi --exclude tests/ --exclude web/ --capture-worktree |
| 91 | + |
| 92 | +Using a Python script: |
84 | 93 |
|
85 | 94 | # reset coverage counters from previous runs |
86 | 95 | find . -name '*.gcda' -delete |
87 | | - # < run tests here > |
| 96 | + # << run tests here >> |
88 | 97 | # generage coverage for every object file found (change "." to build root) |
89 | 98 | find . -name '*.o' -exec gcov -p {} + |
90 | | - # generage and combine coverage reports (--capture-worktree automatically |
91 | | - # makes stray commit if worktree is dirty) |
| 99 | + # collect coverage (--capture-worktree automatically makes stray commit if |
| 100 | + # worktree is dirty) |
92 | 101 | uncov-gcov --root . --no-gcov --capture-worktree --exclude tests | uncov new |
93 | 102 | # remove coverage reports |
94 | 103 | find . -name '*.gcov' -delete |
95 | 104 |
|
96 | | -Earlier versions of GCC: |
97 | | - |
98 | | - # drop coverage counters from previous run |
99 | | - find . -name '*.gcda' -delete |
100 | | - # < run tests at this point > |
101 | | - uncov new-gcovi --exclude tests/ --exclude web/ --capture-worktree |
102 | | - |
103 | 105 | ### Example ### |
104 | 106 |
|
105 | 107 | The easiest way of checking out `uncov` is by using it on itself (assuming that |
|
0 commit comments