"make coverage-lcov" doesn't work with lcov v2.x
Aberta
Ninguém assumiu esta issue ainda.
build
type-bug
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece em Makefile.pre.in, no destino coverage-lcov, e revise os comandos lcov e genhtml mostrados no relatório. Execute make coverage-lcov com lcov 2.x e, em seguida, verifique se os dados de cobertura e o relatório HTML são gerados sem os erros de opção e consistência relatados.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- build-system, testing-qa
- Tipo de issue
- Bug
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 25/100