@@ -92,6 +92,22 @@ patch:
9292 make
9393 @endcode
9494
95+ - Code coverage analysis
96+
97+ By inspecting the code coverage, you can identify potential gaps in your testing
98+ and use that information to improve your test scenarios.
99+
100+ Example usage:
101+ @code
102+ mkdir build-gcov; cd build-gcov
103+ ../configure --enable-gcov [...]
104+ make
105+ # ... Now execute your test scenarios to collect OpenOCD code coverage ...
106+ lcov --capture --directory ./src --output-file openocd-coverage.info
107+ genhtml openocd-coverage.info --output-directory coverage_report
108+ # ... Open coverage_report/index.html in a web browser ...
109+ @endcode
110+
95111Please consider performing these additional checks where appropriate
96112(especially Clang Static Analyzer for big portions of new code) and
97113mention the results (e.g. "Valgrind-clean, no new Clang analyzer
@@ -153,11 +169,9 @@ git remote add review https://USERNAME:
[email protected] /p/openocd.git
153169Gerrit server, even if you plan to use several local branches for different
154170topics. It is possible because @c for/master is not a traditional Git
155171branch.
156- -# You will need to install this hook, we will look into a better solution:
157- @code
158- scp -p -P 29418
[email protected] :hooks/commit-msg .git/hooks/
159- @endcode
160- Or with http only:
172+ -# You will need to install this hook to automatically add the
173+ field "Change-Id:" in the commit message, as required by Gerrit.
174+ We will look into a better solution:
161175@code
162176wget https://review.openocd.org/tools/hooks/commit-msg
163177mv commit-msg .git/hooks
@@ -234,6 +248,12 @@ doc: fix typos
234248@code
235249git pull --rebase origin master
236250@endcode
251+
252+ -# When you create a new version of an old patch, check that the new patch
253+ keeps the same 'Change-Id:' field of the old patch.
254+ This allows the Gerrit server to recognize the patch as a new version of
255+ the older one and keeps track of the history and the review process.
256+
237257-# Send the patches to the Gerrit server for review:
238258@code
239259git push review
@@ -291,6 +311,13 @@ Only for <em>exceptional cases</em>, it is allowed to submit patches
291311to Gerrit with the special field 'Checkpatch-ignore:' in the commit
292312message. This field will cause checkpatch to ignore the error types
293313listed in the field, only for the patch itself.
314+ For errors in the commit message, the special field has to be put in
315+ the commit message before the line that produces the error.
316+ The special field must be added <em>before</em> the 'Signed-off-by:'
317+ line, otherwise it is ignored.
318+ To ignore multiple errors, either add multiple lines with the special
319+ field or add multiple error types, separated by space or commas, in a
320+ single line.
294321The error type is printed by checkpatch on failure.
295322For example the names of Windows APIs mix lower and upper case chars,
296323in violation of OpenOCD coding style, triggering a 'CAMELCASE' error:
0 commit comments