Commit Graph

324 Commits

Author SHA1 Message Date
Ross Patterson
2ef422e064 test(vcs): Add a VCS push hook to run tests
Personally, I can't stand working without a VCS hook anymore.  It saves me so much time
in context switches from revisiting and revising PRs when I see that the CI run is red.
Much better to fail before I push so I can revise while the relevant changes are fresh
in my head.

In order to start using this, one has to run `$ make build` first.  Should I add that
and make other documentation changes in the wiki related to my changes in this PR?
2020-09-25 10:18:11 -07:00
Ross Patterson
430881be15 test(py3): Capture how to run all tests under py3
Useful to review common errors under Python 3 as opposed to module-by-module.
2020-09-24 11:37:58 -07:00
Ross Patterson
92de966c91 test(runner): Use checked out source for local tests
TL;DR: Capture how to use real source file paths for local development.

It can be useful to run the tests against the currently checked out Python source files.
Changes are reflected immediately.  Source file paths in Tracebacks (and other things
that print the file path for Python modules) are to the actual checked out source and
can be copied and pasted or used by tools that expect real paths.

OTOH, testing against a real Python package install into a virtualenv done from a real
source distribution can expose rare but very confusing issues.

So doing both is valuable.  Most typically, the former is useful for local development
and the latter is most appropriate in CI.
2020-09-24 11:37:49 -07:00
Ross Patterson
b4b996c3e7 build(make): Cleanup remnant coverage bits
I don't see anything in here that I can find references to elsewhere and we're certainly
running test coverage reports in tox and on CI now.
2020-09-17 16:09:53 -07:00
Ross Patterson
51338bd874 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.
2020-09-17 16:08:20 -07:00
Ross Patterson
d8df630729 build(make): Add missing phony target declarations
I also prefer having a `.PHONY: ...` declaration for each phony target, as is done in
the rest of the `./Makefile`, because it makes is easier when removing or refactoring
targets not to forget to also remove or adjust the `.PHONY: ...` declaration.
2020-09-17 12:36:55 -07:00
Ross Patterson
775a3dba33 build(make): Fix missing target name
From context, I'm assuming this is just an omission.
2020-09-17 12:33:13 -07:00
Ross Patterson
735ff1e709 build(make): Improve and clarify Makefile org
This is opinionated, so I understand if community members disagree and I'm happy to back
this out.

It's conventional (and I prefer) to group variables toward the top of the `./Makefile`
so I've done that.

I also prefer separating task-oriented "phony" targets above any "real" targets (whose
recipes create/update actual build artifacts on the filesystem).  The task-oriented
targets tend to be a better starting point for any developers approaching the
`./Makefile` to understand where to get started.
2020-09-17 12:25:34 -07:00
Ross Patterson
da24739c59 build(make): Cleanup unused target
AFAIK, prefixing a target with a `.` (aside from the special targets make itself treats
differently) is just to exclude it from being the default target, but the default target
is already defined above this one.  Also, it just runs another target which doesn't
exist AFAIKT.
2020-09-17 12:19:35 -07:00
Ross Patterson
7a3320f4bb build(make): Defensive make settings
https://tech.davis-hansson.com/p/make/

Prevents things like silent shell pipeline errors in recipes, unexpected behavior from
undefined variables, etc.
2020-09-17 11:54:49 -07:00
Itamar Turner-Trauring
906d6ac291 Switch to flake8 as a better way of running pyflakes. 2020-07-06 13:50:06 -04:00
Jean-Paul Calderone
76d667865e
Remove some top-level packaging related to magic-folders 2020-02-13 10:21:45 -05:00
Jean-Paul Calderone
4f649f313e Don't upload because we can't 2019-01-26 10:02:08 -05:00
Brian Warner
906c4f4f32 move tarball generation to tox.ini
and change the Makefile to delegate the "tarballs" target to tox

This should fix the ticket:2910 problem of the "tarballs" buildbot failing.
2018-03-27 14:34:32 -07:00
Brian Warner
36c57c74f4 make tox env for code-checks
This executes: check-debugging, check-interfaces, check-miscaptures,
find-trailing-spaces, check-umids, pyflakes.

Other changes:

* fix check-umids.py to take starting points. run it as `check-umids.py
  src` instead of `check-umids.py src/allmydata/*.py`
* check-debugging: rewrite in python to run from tox: tox doesn't like
  to run shell scripts.
* put check-interfaces.py last: it produces lots of warnings, but passes
  anyways. The others only produce significant output if they fail.
2016-08-19 17:42:05 -07:00
meejah
d641aef2a3 Simple test for defer.setDebugging(True) calls 2016-08-19 11:37:15 -06:00
meejah
946656b249 smoketest for magic-folder functionality 2016-07-21 12:35:59 -07:00
Brian Warner
9be9c20c0e Makefile: upload wheel too 2016-03-30 15:58:01 -07:00
Brian Warner
c4b1d8c291 Makefile: create wheels too 2016-03-30 15:54:31 -07:00
Brian Warner
7381b4a0aa update Makefile too 2016-03-25 12:58:05 -07:00
Daira Hopwood
0598c830ed Rename distribution from allmydata-tahoe to tahoe-lafs. fixes ticket:2011
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-03-25 19:16:01 +00:00
Brian Warner
2c9297f27e Makefile: remove src/buildtest from SOURCES
Oops, missed this one earlier, it caused the pyflakes check to fail.
2016-03-23 02:19:50 -07:00
Brian Warner
1f712c8ddb Makefile: remove/deprecate old targets
This replaces the following targets with "echo this is obsolete":

* fetch-and-unpack-deps (used by the old 'tarballs' builder, for SUMO tarballs)
* test-desert-island (used by the old 'clean' builder)
* test-pip-install (used by 'new-pip' builder before we switched)

It also removes the test-pip-install.py helper script.
2016-03-22 14:12:45 -07:00
Brian Warner
1fb7cc7f18 Makefile: stop producing SUMO tarballs
refs ticket:2752
2016-03-22 14:12:35 -07:00
Brian Warner
16f07b34ce remove old misc/dependencies/ contents and references 2016-03-22 13:38:31 -07:00
Brian Warner
c3bf9534ec Makefile: remove/disable most broken stuff
probably fixes ticket:2743
2016-03-17 22:23:39 -07:00
Brian Warner
0651991474 copy bin/tahoe from $PATH for the sake of test_runner
This is needed to allow virtualenv-based builds to exercise
test_runner.BinTahoe (and a few others), which expect to run an
executable program in "bin/tahoe". This also helps users who aren't yet
accustomed to the new virtualenv world where they can just run "tahoe"
instead of "bin/tahoe".

This changes the "setup.py make_executable" command to copy the first
"tahoe" executable found on $PATH into bin/tahoe . Previously bin/tahoe
was created by modifying the shbang line of a template stored in
bin/tahoe-script.template (which has been deleted).

It also changes setup.cfg to run "make_executable" before tests,
and *after* an install. Note that you must use "setup.py install" before
"setup.py test", since make_executable requires the installed "tahoe" on
$PATH.

In the future, we hope to get rid of bin/tahoe altogether, and have
these tests run the "tahoe" from $PATH directly.
2016-03-15 17:31:32 +00:00
Brian Warner
24ed8431b2 move 'check-memory' from Makefile into tox.ini
So use 'tox -e check-memory' instead of 'make check-memory'. The tox
version will create a virtualenv and install tahoe for you before
running the tests, removing one use of the 'tahoe @FILENAME' hack (which
was used to run a python file with a PYTHONPATH set to import tahoe's
dependencies).
2016-03-08 21:19:41 -08:00
Brian Warner
75135af65f Makefile: run pyflakes as 'pyflakes', not python which pyflakes
This funky invocation syntax was introduced in 2007 (commit 56ad518),
with a comment of "make pyflakes run faster". I no longer have any idea
why that might have been the case. It's time to simplify this, because
some of our buildslaves have pipsi-installed "pyflakes" on their $PATH,
which use a "python" that's different than the one on $PATH.
2016-02-05 12:32:02 -08:00
Brian Warner
15a1550ced Makefile upload-osx-pkg: mention where the packages go 2015-07-16 09:27:26 -07:00
Brian Warner
d8e60f82a4 add test-pip-install 2015-06-16 13:46:43 -07:00
Daira Hopwood
61f3d5ae13 Move computation of Tahoe version from Makefile to build-osx-pkg.sh. refs #2393
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-03-24 16:41:43 +00:00
Brian Warner
c12d49b54e create/test/upload tahoe-lafs-VERSION-osx.pkg, not tahoe-lafs-osx.pkg
Closes ticket:2393
2015-03-21 14:20:00 -07:00
Brian Warner
05c6966801 move build-osx-pkg out to a separate shell script
Also remove the duplicate test-osx-pkg (i.e. don't run the test as part
of the build, and have the caller do it themselves later).
2015-03-21 14:12:21 -07:00
Brian Warner
7846f5f9c8 Makefile: add upload-osx-pkg rule 2015-03-20 10:52:48 -07:00
Ramakrishnan Muthukrishnan
c2e415b312 Makefile: make "build-osx-pkg" build target depend on the "build" target 2015-01-13 15:01:46 +05:30
Daira Hopwood
4e3b5b7f48 Makefile: make APPNAME a variable.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-12-05 17:53:13 +00:00
Daira Hopwood
f4d40ffcbf misc/build_helpers/test-osx-pkg.py: script to test the OS X pkg.
After extracting the contents of the package, this script looks at the
output of 'tahoe --version-and-path' to see if the modules are installed
and invoked from the right path.

Author: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-20 17:52:46 +01:00
Ramakrishnan Muthukrishnan
fad766a885 clean target should remove the pkg file. 2014-10-20 17:52:46 +01:00
Daira Hopwood
74689af7a1 New make target for OS X package creation.
Author: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-10-20 17:52:46 +01:00
Zooko
f0ef82bfac remove all the unused scripts from build_helpers
Fixes #2305.
2014-09-30 03:54:55 +00:00
Brian Warner
2584169f7f Makefile: remove 'twisted' from SOURCES 2014-09-09 10:31:05 -07:00
Daira Hopwood
53dc723184 Update .PHONY declarations in Makefile.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-08 22:49:54 +01:00
Daira Hopwood
4f51040313 Update coverage-related targets in Makefile. refs #1698
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-08 22:49:23 +01:00
Daira Hopwood
7046636c74 Delete useless stuff from Makefile.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2014-09-08 22:47:31 +01:00
Brian Warner
83068a90c8 Makefile: fix test-clean by using 'distclean' 2014-09-02 18:32:27 -07:00
Daira Hopwood
7f10bf07df Makefile: update comment for 'make clean'.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2013-10-10 19:50:49 +01:00
Daira Hopwood
95567e55a2 Add 'make distclean'.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2013-10-10 17:47:30 +01:00
Zooko Wilcox-O'Hearn
70939fb454 remove tahoe egg-info dir from the "clean" rule
fixes #2092
2013-10-10 01:52:44 +00:00
Daira Hopwood
aa29f2655d tahoe debug trial: print a warning message if testing uncommitted code. fixes #1992
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-08-31 18:01:34 +01:00