From 51338bd87429bd283a5adc7ecb274dd80b345f59 Mon Sep 17 00:00:00 2001 From: Ross Patterson Date: Thu, 17 Sep 2020 14:09:08 -0700 Subject: [PATCH] build(make): Add targets for running tests Fully parallelize the build of the environments since they tend to be network I/O bound. Parallelize the run of tests to use all CPU cores. --- .gitignore | 1 + Makefile | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 93802b22b..0bc7dc0b9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ zope.interface-*.egg /tahoe-deps/ /tahoe-deps.tar.gz /.coverage +/.coverage.* /.coverage.el /coverage-html/ /miscaptures.txt diff --git a/Makefile b/Makefile index 780d27c26..2b176c4be 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,11 @@ APPNAME=tahoe-lafs default: @echo "no default target" +.PHONY: test +## Run all tests and code reports +test: .tox + tox -p auto + # This is necessary only if you want to automatically produce a new # _version.py file from the current git history (without doing a build). .PHONY: make-version @@ -199,6 +204,7 @@ distclean: clean rm -rf src/*.egg-info rm -f src/allmydata/_version.py rm -f src/allmydata/_appname.py + rm -rf ./.tox/ .PHONY: find-trailing-spaces @@ -237,3 +243,6 @@ upload-tarballs: src/allmydata/_version.py: $(MAKE) make-version + +.tox: tox.ini setup.py + tox --notest -p all