diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-27 11:53:24 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-27 11:53:24 +0200 |
commit | 9771926a029c191b101d7a7d14dc27dd734658e7 (patch) | |
tree | 5ab99e4e109099a19da7ceb6f4b398911586f166 | |
parent | mention Valgrind tests in DEVELOPMENT.md (diff) | |
download | cimple-9771926a029c191b101d7a7d14dc27dd734658e7.tar.gz cimple-9771926a029c191b101d7a7d14dc27dd734658e7.zip |
Makefile: reorder targets, add comments
Diffstat (limited to '')
-rw-r--r-- | Makefile | 44 |
1 files changed, 24 insertions, 20 deletions
@@ -51,20 +51,6 @@ build: release: CONFIGURATION := Release release: build -.PHONY: coverage -coverage: COMPILER := gcc -coverage: CONFIGURATION := Debug -coverage: COVERAGE := 1 -coverage: clean build test - @echo ----------------------------------------------------------------- - @echo Generating code coverage report - @echo ----------------------------------------------------------------- - @mkdir -p -- '$(call escape,$(coverage_dir))' - gcovr --html-details '$(call escape,$(coverage_dir))/index.html' --print-summary -ifndef CI - xdg-open '$(call escape,$(coverage_dir))/index.html' &> /dev/null -endif - .PHONY: install install: build cmake --install '$(call escape,$(cmake_dir))' @@ -85,6 +71,15 @@ test/stress: ctest --test-dir '$(call escape,$(cmake_dir))' \ --verbose --tests-regex python_tests_stress +# Run the basic "sanity" tests & the stress tests by default. +.PHONY: test +test: test/sanity test/stress + +# When building for a Docker image for a different platform, exclude stress +# tests: they simply take way too long. +.PHONY: test/docker +test/docker: test/sanity + .PHONY: test/valgrind test/valgrind: @echo ----------------------------------------------------------------- @@ -93,6 +88,21 @@ test/valgrind: ctest --test-dir '$(call escape,$(cmake_dir))' \ --verbose --tests-regex python_tests_valgrind +.PHONY: coverage +coverage: COMPILER := gcc +coverage: CONFIGURATION := Debug +coverage: COVERAGE := 1 +# Force a rebuild for a coverage report, since it depends on the GCC debug data. +coverage: clean build test + @echo ----------------------------------------------------------------- + @echo Generating code coverage report + @echo ----------------------------------------------------------------- + @mkdir -p -- '$(call escape,$(coverage_dir))' + gcovr --html-details '$(call escape,$(coverage_dir))/index.html' --print-summary +ifndef CI + xdg-open '$(call escape,$(coverage_dir))/index.html' &> /dev/null +endif + .PHONY: flame_graphs flame_graphs: @echo ----------------------------------------------------------------- @@ -100,9 +110,3 @@ flame_graphs: @echo ----------------------------------------------------------------- ctest --test-dir '$(call escape,$(cmake_dir))' \ --verbose --tests-regex python_tests_flame_graphs - -.PHONY: test/docker -test/docker: test/sanity - -.PHONY: test -test: test/sanity test/stress |