From: Brian Warner Date: Tue, 1 May 2007 18:08:39 +0000 (-0700) Subject: makefile: change the 'test' target to exclude foolscap, add 'test-all' to do both X-Git-Tag: allmydata-tahoe-0.2.0~21 X-Git-Url: https://git.rkrishnan.org/class-simplejson.JSONEncoder.html?a=commitdiff_plain;h=8004087fb25173b7a0b9c1f291ba7ef2ee455a20;p=tahoe-lafs%2Ftahoe-lafs.git makefile: change the 'test' target to exclude foolscap, add 'test-all' to do both --- diff --git a/GNUmakefile b/GNUmakefile index ba01374e..b72bc4b0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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` diff --git a/README b/README index 4de0215c..b9edee6f 100644 --- a/README +++ b/README @@ -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: