"make coverage-lcov" doesn't work with lcov v2.x
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
Bug description:
The Python Developer’s Guide says:
In order to create a HTML report you can install lcov.
Unfortunately, this doesn't work with a modern version of the lcov: e.g. first I got error about missing --path option. It "works for me" (with some warnings) on the patch:
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2b34b009fd7..20b895d488a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -917,7 +917,6 @@ coverage-lcov:
@lcov $(COVERAGE_LCOV_OPTIONS) --capture \
--directory $(abs_builddir) \
--base-directory $(realpath $(abs_builddir)) \
- --path $(realpath $(abs_srcdir)) \
--output-file $(COVERAGE_INFO)
@ # remove 3rd party modules, system headers and internal files with
@ # debug, test or dummy functions.
@@ -931,8 +930,11 @@ coverage-lcov:
'/usr/include/*' \
'/usr/local/include/*' \
'/usr/lib/gcc/*' \
+ --ignore-errors inconsistent \
+ --ignore-errors unused \
--output-file $(COVERAGE_INFO)
@genhtml $(COVERAGE_INFO) \
+ --ignore-errors inconsistent \
--output-directory $(COVERAGE_REPORT) \
$(COVERAGE_REPORT_OPTIONS)
@echo
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-151008
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Iniziare in Makefile.pre.in, all’obiettivo coverage-lcov, e rivedere i comandi lcov e genhtml mostrati nel report. Eseguire make coverage-lcov con lcov 2.x, quindi verificare che i dati di coverage e il report HTML vengano generati senza gli errori relativi alle opzioni e alla coerenza segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- build-system, testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 25/100