Makefile: remove/disable most broken stuff
probably fixes ticket:2743
This commit is contained in:
parent
141ff17b91
commit
c3bf9534ec
160
Makefile
160
Makefile
|
@ -1,17 +1,14 @@
|
||||||
|
|
||||||
# NOTE: this Makefile requires GNU make
|
# NOTE: this Makefile requires GNU make
|
||||||
|
|
||||||
default: build
|
default:
|
||||||
|
@echo "no default target"
|
||||||
|
|
||||||
PYTHON=python
|
PYTHON=python
|
||||||
export PYTHON
|
export PYTHON
|
||||||
PYFLAKES=pyflakes
|
PYFLAKES=pyflakes
|
||||||
export PYFLAKES
|
export PYFLAKES
|
||||||
|
|
||||||
# setup.py will extend sys.path to include our support/lib/... directory
|
|
||||||
# itself. It will also create it in the beginning of the 'develop' command.
|
|
||||||
|
|
||||||
TAHOE=$(PYTHON) bin/tahoe
|
|
||||||
SOURCES=src/allmydata src/buildtest static misc setup.py
|
SOURCES=src/allmydata src/buildtest static misc setup.py
|
||||||
APPNAME=allmydata-tahoe
|
APPNAME=allmydata-tahoe
|
||||||
|
|
||||||
|
@ -27,16 +24,9 @@ make-version:
|
||||||
src/allmydata/_version.py:
|
src/allmydata/_version.py:
|
||||||
$(MAKE) make-version
|
$(MAKE) make-version
|
||||||
|
|
||||||
# It is unnecessary to have this depend on build or src/allmydata/_version.py,
|
|
||||||
# since 'setup.py build' always updates the version.
|
|
||||||
.PHONY: build
|
|
||||||
build:
|
|
||||||
$(PYTHON) setup.py build
|
|
||||||
touch .built
|
|
||||||
|
|
||||||
# Build OS X pkg packages.
|
# Build OS X pkg packages.
|
||||||
.PHONY: build-osx-pkg test-osx-pkg upload-osx-pkg
|
.PHONY: build-osx-pkg test-osx-pkg upload-osx-pkg
|
||||||
build-osx-pkg: build
|
build-osx-pkg:
|
||||||
misc/build_helpers/build-osx-pkg.sh $(APPNAME)
|
misc/build_helpers/build-osx-pkg.sh $(APPNAME)
|
||||||
|
|
||||||
test-osx-pkg:
|
test-osx-pkg:
|
||||||
|
@ -50,82 +40,28 @@ upload-osx-pkg:
|
||||||
echo not uploading tahoe-lafs-osx-pkg because this is not trunk but is branch \"${BB_BRANCH}\" ; \
|
echo not uploading tahoe-lafs-osx-pkg because this is not trunk but is branch \"${BB_BRANCH}\" ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TESTING
|
|
||||||
|
|
||||||
# you can use 'make test TEST=allmydata.test.test_introducer' to run just
|
# code coverage-based testing is disabled temporarily, as we switch to tox.
|
||||||
# test_introducer. TEST=allmydata.test.test_client.Basic.test_permute works
|
# This will eventually be added to a tox environment. The following comments
|
||||||
# too.
|
# and variable settings are retained as notes for that future effort.
|
||||||
TEST=allmydata
|
|
||||||
|
|
||||||
# It is unnecessary to have this depend on build or src/allmydata/_version.py,
|
## # code coverage: install the "coverage" package from PyPI, do "make
|
||||||
# since 'setup.py test' always updates the version and builds before testing.
|
## # test-coverage" to do a unit test run with coverage-gathering enabled, then
|
||||||
.PHONY: test
|
## # use "make coverage-output" to generate an HTML report. Also see "make
|
||||||
test:
|
## # .coverage.el" and misc/coding_tools/coverage.el for Emacs integration.
|
||||||
$(PYTHON) setup.py test $(TRIALARGS) -s $(TEST)
|
##
|
||||||
touch .built
|
## # This might need to be python-coverage on Debian-based distros.
|
||||||
|
## COVERAGE=coverage
|
||||||
.PHONY: check
|
##
|
||||||
check: test
|
## COVERAGEARGS=--branch --source=src/allmydata
|
||||||
|
##
|
||||||
.PHONY: quicktest
|
## # --include appeared in coverage-3.4
|
||||||
quicktest: make-version
|
## COVERAGE_OMIT=--include '$(CURDIR)/src/allmydata/*' --omit '$(CURDIR)/src/allmydata/test/*'
|
||||||
$(TAHOE) debug trial $(TRIALARGS) $(TEST)
|
|
||||||
|
|
||||||
# "make tmpfstest" may be a faster way of running tests on Linux. It works best when you have
|
|
||||||
# at least 330 MiB of free physical memory (to run the whole test suite). Since it uses sudo
|
|
||||||
# to mount/unmount the tmpfs filesystem, it might prompt for your password.
|
|
||||||
.PHONY: tmpfstest
|
|
||||||
tmpfstest:
|
|
||||||
time make _tmpfstest 'TMPDIR=$(shell mktemp -d --tmpdir=.)'
|
|
||||||
|
|
||||||
.PHONY: _tmpfstest
|
|
||||||
_tmpfstest: make-version
|
|
||||||
sudo mount -t tmpfs -o size=400m tmpfs '$(TMPDIR)'
|
|
||||||
-$(TAHOE) debug trial --rterrors '--temp-directory=$(TMPDIR)/_trial_temp' $(TRIALARGS) $(TEST)
|
|
||||||
sudo umount '$(TMPDIR)'
|
|
||||||
rmdir '$(TMPDIR)'
|
|
||||||
|
|
||||||
|
|
||||||
# code coverage: install the "coverage" package from PyPI, do "make test-coverage" to
|
|
||||||
# do a unit test run with coverage-gathering enabled, then use "make coverage-output" to
|
|
||||||
# generate an HTML report. Also see "make .coverage.el" and misc/coding_tools/coverage.el
|
|
||||||
# for Emacs integration.
|
|
||||||
|
|
||||||
# This might need to be python-coverage on Debian-based distros.
|
|
||||||
COVERAGE=coverage
|
|
||||||
|
|
||||||
COVERAGEARGS=--branch --source=src/allmydata
|
|
||||||
|
|
||||||
# --include appeared in coverage-3.4
|
|
||||||
COVERAGE_OMIT=--include '$(CURDIR)/src/allmydata/*' --omit '$(CURDIR)/src/allmydata/test/*'
|
|
||||||
|
|
||||||
.PHONY: test-coverage
|
|
||||||
test-coverage: build
|
|
||||||
rm -f .coverage
|
|
||||||
$(TAHOE) '@$(COVERAGE)' run $(COVERAGEARGS) @tahoe debug trial $(TRIALARGS) $(TEST)
|
|
||||||
|
|
||||||
.PHONY: coverage-output
|
|
||||||
coverage-output:
|
|
||||||
rm -rf coverage-html
|
|
||||||
coverage html -i -d coverage-html $(COVERAGE_OMIT)
|
|
||||||
cp .coverage coverage-html/coverage.data
|
|
||||||
@echo "now point your browser at coverage-html/index.html"
|
|
||||||
|
|
||||||
.coverage.el: .coverage
|
|
||||||
$(PYTHON) misc/coding_tools/coverage2el.py
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: code-checks
|
.PHONY: code-checks
|
||||||
code-checks: build version-and-path check-interfaces check-miscaptures -find-trailing-spaces -check-umids pyflakes
|
#code-checks: build version-and-path check-interfaces check-miscaptures -find-trailing-spaces -check-umids pyflakes
|
||||||
|
code-checks: check-miscaptures -find-trailing-spaces -check-umids pyflakes
|
||||||
.PHONY: version-and-path
|
|
||||||
version-and-path:
|
|
||||||
$(TAHOE) --version-and-path
|
|
||||||
|
|
||||||
.PHONY: check-interfaces
|
|
||||||
check-interfaces:
|
|
||||||
$(TAHOE) @misc/coding_tools/check-interfaces.py 2>&1 |tee violations.txt
|
|
||||||
@echo
|
|
||||||
|
|
||||||
.PHONY: check-miscaptures
|
.PHONY: check-miscaptures
|
||||||
check-miscaptures:
|
check-miscaptures:
|
||||||
|
@ -166,6 +102,21 @@ count-lines:
|
||||||
@echo -n "XXX: "
|
@echo -n "XXX: "
|
||||||
@grep XXX `find src -name '*.py' |grep -v /build/` | wc -l
|
@grep XXX `find src -name '*.py' |grep -v /build/` | wc -l
|
||||||
|
|
||||||
|
|
||||||
|
# Here is a list of testing tools that can be run with 'python' from a
|
||||||
|
# virtualenv in which Tahoe has been installed. There used to be Makefile
|
||||||
|
# targets for each, but the exact path to a suitable python is now up to the
|
||||||
|
# developer. But as a hint, after running 'tox', ./.tox/py27/bin/python will
|
||||||
|
# probably work.
|
||||||
|
|
||||||
|
# src/allmydata/test/bench_dirnode.py
|
||||||
|
# misc/coding_tools/check-interfaces.py 2>&1 |tee violations.txt
|
||||||
|
|
||||||
|
|
||||||
|
# The check-speed and check-grid targets are disabled, since they depend upon
|
||||||
|
# the pre-located $(TAHOE) executable that was removed when we switched to
|
||||||
|
# tox. They will eventually be resurrected as dedicated tox environments.
|
||||||
|
|
||||||
# The check-speed target uses a pre-established client node to run a canned
|
# The check-speed target uses a pre-established client node to run a canned
|
||||||
# set of performance tests against a test network that is also
|
# set of performance tests against a test network that is also
|
||||||
# pre-established (probably on a remote machine). Provide it with the path to
|
# pre-established (probably on a remote machine). Provide it with the path to
|
||||||
|
@ -177,38 +128,23 @@ count-lines:
|
||||||
# The 'sleep 5' is in there to give the new client a chance to connect to its
|
# The 'sleep 5' is in there to give the new client a chance to connect to its
|
||||||
# storageservers, since check_speed.py has no good way of doing that itself.
|
# storageservers, since check_speed.py has no good way of doing that itself.
|
||||||
|
|
||||||
.PHONY: check-speed
|
##.PHONY: check-speed
|
||||||
check-speed: .built
|
##check-speed: .built
|
||||||
if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi
|
## if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi
|
||||||
@echo "stopping any leftover client code"
|
## @echo "stopping any leftover client code"
|
||||||
-$(TAHOE) stop $(TESTCLIENTDIR)
|
## -$(TAHOE) stop $(TESTCLIENTDIR)
|
||||||
$(TAHOE) start $(TESTCLIENTDIR)
|
## $(TAHOE) start $(TESTCLIENTDIR)
|
||||||
sleep 5
|
## sleep 5
|
||||||
$(TAHOE) @src/allmydata/test/check_speed.py $(TESTCLIENTDIR)
|
## $(TAHOE) @src/allmydata/test/check_speed.py $(TESTCLIENTDIR)
|
||||||
$(TAHOE) stop $(TESTCLIENTDIR)
|
## $(TAHOE) stop $(TESTCLIENTDIR)
|
||||||
|
|
||||||
# The check-grid target also uses a pre-established client node, along with a
|
# The check-grid target also uses a pre-established client node, along with a
|
||||||
# long-term directory that contains some well-known files. See the docstring
|
# long-term directory that contains some well-known files. See the docstring
|
||||||
# in src/allmydata/test/check_grid.py to see how to set this up.
|
# in src/allmydata/test/check_grid.py to see how to set this up.
|
||||||
.PHONY: check-grid
|
##.PHONY: check-grid
|
||||||
check-grid: .built
|
##check-grid: .built
|
||||||
if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi
|
## if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi
|
||||||
$(TAHOE) @src/allmydata/test/check_grid.py $(TESTCLIENTDIR) bin/tahoe
|
## $(TAHOE) @src/allmydata/test/check_grid.py $(TESTCLIENTDIR) bin/tahoe
|
||||||
|
|
||||||
.PHONY: bench-dirnode
|
|
||||||
bench-dirnode: .built
|
|
||||||
$(TAHOE) @src/allmydata/test/bench_dirnode.py
|
|
||||||
|
|
||||||
# the provisioning tool runs as a stand-alone webapp server
|
|
||||||
.PHONY: run-provisioning-tool
|
|
||||||
run-provisioning-tool: .built
|
|
||||||
$(TAHOE) @misc/operations_helpers/provisioning/run.py
|
|
||||||
|
|
||||||
# 'make repl' is a simple-to-type command to get a Python interpreter loop
|
|
||||||
# from which you can type 'import allmydata'
|
|
||||||
.PHONY: repl
|
|
||||||
repl:
|
|
||||||
$(TAHOE) debug repl
|
|
||||||
|
|
||||||
.PHONY: test-get-ignore
|
.PHONY: test-get-ignore
|
||||||
test-git-ignore:
|
test-git-ignore:
|
||||||
|
|
Loading…
Reference in New Issue