From 9856e3f1cbf7fd5a227148993675de4821090bea Mon Sep 17 00:00:00 2001 From: zencode Date: Sat, 3 Apr 2021 19:03:52 +0200 Subject: [PATCH 1/3] :rotating_light: Add test commands for missing lines --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 26f564e862..aa27b3cd0f 100644 --- a/Makefile +++ b/Makefile @@ -103,10 +103,22 @@ image-testsuite: -${KIVY_DIR}tools/image-testsuite/imagemagick-testsuite.sh "${KIVY_DIR}tests/image-testsuite" test: + # Run tests and print output. -rm -rf kivy/tests/build - env KIVY_NO_ARGS=1 $(PYTEST) kivy/tests + env KIVY_NO_ARGS=1 $(PYTEST) --cov-report term-missing --cov=kivy kivy/tests + +test-to-txt: + # Run tests and save output to 'coverage.txt'. + -rm -rf kivy/tests/build + env KIVY_NO_ARGS=1 $(PYTEST) --cov-report term-missing --cov=kivy kivy/tests > coverage.txt + +test-to-xml: + # Run tests and save output to 'coverage.xml'. + -rm -rf kivy/tests/build + env KIVY_NO_ARGS=1 $(PYTEST) --cov-report xml --cov-report term-missing --cov=kivy kivy/tests cover: + # Note: This option does not currently support the missing lines analysis. coverage html --include='$(KIVY_DIR)*' --omit '$(KIVY_DIR)data/*,$(KIVY_DIR)lib/*,$(KIVY_DIR)tools/*,$(KIVY_DIR)tests/*' install: From 62eb14924c794f46342e9435544416ecdaf31a6d Mon Sep 17 00:00:00 2001 From: zencode Date: Sat, 3 Apr 2021 19:56:31 +0200 Subject: [PATCH 2/3] :hammer: Made including lines the default --- Makefile | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aa27b3cd0f..55b278fc5c 100644 --- a/Makefile +++ b/Makefile @@ -110,12 +110,12 @@ test: test-to-txt: # Run tests and save output to 'coverage.txt'. -rm -rf kivy/tests/build - env KIVY_NO_ARGS=1 $(PYTEST) --cov-report term-missing --cov=kivy kivy/tests > coverage.txt + env KIVY_NO_ARGS=1 $(PYTEST) kivy/tests > coverage.txt test-to-xml: # Run tests and save output to 'coverage.xml'. -rm -rf kivy/tests/build - env KIVY_NO_ARGS=1 $(PYTEST) --cov-report xml --cov-report term-missing --cov=kivy kivy/tests + env KIVY_NO_ARGS=1 $(PYTEST) --cov-report xml kivy/tests cover: # Note: This option does not currently support the missing lines analysis. diff --git a/pyproject.toml b/pyproject.toml index c13c831184..ef84621939 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,4 +11,4 @@ requires = [ ] [tool.pytest.ini_options] -addopts = "--benchmark-skip --benchmark-warmup=on --benchmark-warmup-iterations=5 --benchmark-disable-gc --benchmark-name=short --benchmark-sort=mean --benchmark-group-by=fullfunc --benchmark-storage=.benchmarks-kivy --benchmark-save=kivy" +addopts = "--benchmark-skip --benchmark-warmup=on --benchmark-warmup-iterations=5 --benchmark-disable-gc --benchmark-name=short --benchmark-sort=mean --benchmark-group-by=fullfunc --benchmark-storage=.benchmarks-kivy --benchmark-save=kivy --cov-report term-missing --cov=kivy" From 274635531a7182889e1dd12376ebe9cc06fb02fe Mon Sep 17 00:00:00 2001 From: zencode Date: Sat, 3 Apr 2021 20:09:25 +0200 Subject: [PATCH 3/3] :hammer: Revert back to previosu metho --- Makefile | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 55b278fc5c..0f5eacf851 100644 --- a/Makefile +++ b/Makefile @@ -105,17 +105,17 @@ image-testsuite: test: # Run tests and print output. -rm -rf kivy/tests/build - env KIVY_NO_ARGS=1 $(PYTEST) --cov-report term-missing --cov=kivy kivy/tests + env KIVY_NO_ARGS=1 $(PYTEST) kivy/tests test-to-txt: - # Run tests and save output to 'coverage.txt'. + # Run tests with missing line stats and save output to 'coverage.txt'. -rm -rf kivy/tests/build - env KIVY_NO_ARGS=1 $(PYTEST) kivy/tests > coverage.txt + env KIVY_NO_ARGS=1 $(PYTEST) --cov-report term-missing --cov=kivy kivy/tests > coverage.txt test-to-xml: - # Run tests and save output to 'coverage.xml'. + # Run tests with missing line stats and save output to 'coverage.xml'. -rm -rf kivy/tests/build - env KIVY_NO_ARGS=1 $(PYTEST) --cov-report xml kivy/tests + env KIVY_NO_ARGS=1 $(PYTEST) --cov-report xml --cov-report term-missing --cov=kivy kivy/tests cover: # Note: This option does not currently support the missing lines analysis. diff --git a/pyproject.toml b/pyproject.toml index ef84621939..c13c831184 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,4 +11,4 @@ requires = [ ] [tool.pytest.ini_options] -addopts = "--benchmark-skip --benchmark-warmup=on --benchmark-warmup-iterations=5 --benchmark-disable-gc --benchmark-name=short --benchmark-sort=mean --benchmark-group-by=fullfunc --benchmark-storage=.benchmarks-kivy --benchmark-save=kivy --cov-report term-missing --cov=kivy" +addopts = "--benchmark-skip --benchmark-warmup=on --benchmark-warmup-iterations=5 --benchmark-disable-gc --benchmark-name=short --benchmark-sort=mean --benchmark-group-by=fullfunc --benchmark-storage=.benchmarks-kivy --benchmark-save=kivy"