makefile: change the 'test' target to exclude foolscap, add 'test-all' to do both

This commit is contained in:
Brian Warner 2007-05-01 11:08:39 -07:00
parent 0650e5543f
commit 8004087fb2
2 changed files with 18 additions and 15 deletions

View File

@ -109,23 +109,28 @@ stop-introducer: build
# TESTING
.PHONY: test
.PHONY: test-all test test-foolscap test-figleaf figleaf-output
ifeq ($(TEST),)
# you can use 'make test TEST=allmydata.test.test_introducer' to run just a
# specific test. TEST=allmydata.test.test_client.Basic.test_permute works
# too.
TEST=allmydata zfec
endif
REPORTER=
test-all: test-foolscap test
# use 'make test REPORTER=--reporter=bwverbose' from buildbot, to supress the
# ansi color sequences
test: build test-foolscap test-TEST
test: build
$(PP) $(TRIAL) $(REPORTER) $(TEST)
# foolscap tests need to be run in their own source dir, so that the paths to
# the .pyc files are correct (since some of the foolscap tests depend upon
# stack traces having actual source code in them, and they don't when the
# tests are run from the 'instdir' that the tahoe makefile uses).
test-foolscap:
cd src/foolscap && PYTHONPATH=$(ORIGPYTHONPATH) $(TRIAL) $(REPORTER) foolscap
test-TEST:
$(PP) $(TRIAL) $(REPORTER) $(TEST)
test-figleaf: build
rm -f .figleaf
$(PP) $(TRIAL) --reporter=bwverbose-figleaf $(TEST)
@ -133,10 +138,13 @@ test-figleaf: build
figleaf-output:
$(PP) $(PYTHON) misc/figleaf2html -d coverage-html -r $(INSTDIR)/lib -x misc/figleaf.excludes
@echo "now point your browser at coverage-html/index.html"
# after doing test-figleaf and figleaf-output, point your browser at
# coverage-html/index.html
# this command is meant to be run with an
.PHONY: upload-figleaf .figleaf.el pyflakes count-lines check-memory clean
# 'upload-figleaf' is meant to be run with an UPLOAD_TARGET=host:/dir setting
ifdef UPLOAD_TARGET
upload-figleaf:
rsync -a coverage-html/ $(UPLOAD_TARGET)
@ -168,12 +176,7 @@ clean: clean-zfec clean-Crypto clean-foolscap
rm -f debian
rm -rf instdir
create_dirs:
mkdir -p introducer_and_vdrive-basedir
mkdir -p client-basedir
mkdir -p client-basedir2
mkdir -p client-basedir/storage
mkdir -p client-basedir2/storage
# DEBIAN PACKAGING
VER=$(shell python -c "import os,re;print re.search(\"verstr=['\\\"](.*?)['\\\"]\", open(os.path.join('src', 'allmydata', '__init__.py')).readline()).group(1)")
DEBSTRING=$(VER)-T`date +%s`

2
README
View File

@ -110,7 +110,7 @@ BUILDING:
If the desired version of 'python' is not already on your PATH, then type
'make PYTHON=/path/to/your/preferred/python'.
'make test' runs the unit test suite.
'make test-all' runs the unit test suites.
INSTALLING: