Commit Graph

251 Commits

Author SHA1 Message Date
Jason R. Coombs
b591181b02 In py36 env, run the tahoe --version command now that it runs without error. 2020-08-21 19:55:34 -04:00
Jean-Paul Calderone
f7c3c53206
Go directly to trial instead of the ratchet helper 2020-08-14 11:19:01 -04:00
Jean-Paul Calderone
9695e87fbd
Revert to master version of these configs 2020-08-14 11:16:45 -04:00
Chad Whitacre
96e3d94172 Fold py36 back into normal tox run
This removes the individual-test-based ratchet.
2020-08-13 05:55:48 -04:00
Jean-Paul Calderone
4a4a88773e
Merge remote-tracking branch 'origin/master' into 3336.py36-off-travis 2020-08-10 10:31:26 -04:00
Jean-Paul Calderone
9853fa9090
Pin Python 2 compatible PyInstaller 2020-08-10 09:59:36 -04:00
Jean-Paul Calderone
f4e1062aa4
Merge remote-tracking branch 'origin/master' into 3336.py36-off-travis 2020-08-10 09:13:01 -04:00
Jean-Paul Calderone
360a97a579
Let the python36 job have the env vars 2020-08-07 23:08:48 -04:00
Chad Whitacre
2a6cd8eb58 Get tox -e codechecks to work (on macOS?)
Without this, git fails underneath towncrier with an "error: Could not
expand include path '~/.gitcinclude'".

See: https://stackoverflow.com/q/36908041

I had added similar for `tox -e py36` in d25c8b1a.
2020-08-03 21:19:26 -04:00
Jean-Paul Calderone
612afdcf7c
that is useless, the error is in the docker image build 2020-08-03 17:02:15 -04:00
Jean-Paul Calderone
a513c7ab28
try setting it in here 2020-08-03 17:02:15 -04:00
Jean-Paul Calderone
ec7531f113
maybe this will let it get to the right place 2020-08-03 17:02:15 -04:00
Chad Whitacre
d25c8b1a25 Start ratcheting up passing tests under Python 3 2020-07-13 22:42:48 -04:00
Chad Whitacre
b47b4a468b Prevent Nevow from blocking us
Per https://github.com/tahoe-lafs/tahoe-lafs/pull/732#issuecomment-653059972
2020-07-13 22:28:00 -04:00
Chad Whitacre
73c40e8d2a Minimally add py36 to CI 2020-07-13 22:27:59 -04: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
3c1bffdc9e
Don't install Twisted trunk@HEAD since it doesn't support Python 2 2020-04-13 10:36:54 -04:00
meejah
241b5a3d36 use Tox to build NEWS 2020-03-11 10:54:21 -06:00
Sajith Sasidharan
bcfd3a5eb8 Pass posargs to py.test when running integration tests
Running "tox -e integration" takes a while.  It would be helpful to
run tests from just one file.  With this change, we can do that, like
so:

  $ tox -e integration -- integration/test_web.py

Or even just one test, like so:

  $ tox -e integration -- integration/test_web.py::test_index

With this investigating failing integration tests will be a little
easier, hopefully.

Fixes: ticket:3285
2020-03-06 15:37:19 -05:00
Jean-Paul Calderone
9a6d5cb628 Attempt to inherit the base dependencies in the pyinstaller env 2020-01-20 11:35:14 -05:00
Jean-Paul Calderone
55b87b264c use --pyproject 2020-01-09 14:20:33 -05:00
Jean-Paul Calderone
b9e794a5c8 Merge remote-tracking branch 'meejah/codechecks-delete-local.0' into 2941.codechecks-clean 2020-01-09 14:19:46 -05:00
Chris Wood
ee5a0d27bd Add 'pip freeze' step to 'pyinstaller' tox testenv 2019-10-07 11:30:10 -04:00
meejah
e178d7d809
Merge pull request #524 from meejah/2942.towncrier-draft
add a 'draftnews' tox environment
2019-09-03 10:47:05 -06:00
meejah
ba5f44354b
Merge pull request #636 from meejah/integration-test-coverage
coverage for integration tests
2019-08-08 18:40:29 +00:00
meejah
43162f2ffe combine for normal runs, too 2019-08-07 13:51:05 -06:00
meejah
8e4b05214a add --coverage for integration tests 2019-08-06 16:47:43 -06:00
Jean-Paul Calderone
bb385d45f7 teach tox about the new --package option 2019-08-02 18:29:04 -06:00
Jean-Paul Calderone
39d989676a Attempt to define pypy27 and pypy27-coverage tox environments 2019-06-25 14:16:09 -04:00
tpltnt
cbec4f803a fixing codechecks / lint for circleci 2019-05-22 10:31:08 +02:00
Jean-Paul Calderone
b4459c2dc1 Merge remote-tracking branch 'origin/master' into 3029.install-test-plugins 2019-05-14 06:26:19 -04:00
Jean-Paul Calderone
0294d14401 explain the new pip freeze in the coverage commands 2019-05-14 03:37:35 -04:00
Jean-Paul Calderone
aec341eea8 explain the pinning in tox deps config 2019-05-14 03:36:34 -04:00
Jean-Paul Calderone
1717243212 Re-pin these because it's nice to know what versions we're using 2019-05-13 11:32:02 -04:00
Jean-Paul Calderone
7c71dd6e14 going to try another fix 2019-05-13 11:18:39 -04:00
Jean-Paul Calderone
27962dcd2f Try pinning *new* versions
Tox released 4 hours ago ******BROKE****** everything by removing the
upgrade-these-packages-automatically feature.

Not that I'm bitter.
2019-05-13 11:14:05 -04:00
Jean-Paul Calderone
33bd9bf503 Get a not-*quite*-so-old version of pip 2019-05-13 10:31:46 -04:00
Jean-Paul Calderone
abf319888d Try pinning pip another way
Previous commit didn't yield any information because the error happens before
the commands are run.
2019-05-13 10:27:41 -04:00
Jean-Paul Calderone
f17647f29c Find out what versions are in the tox environment 2019-05-13 10:23:18 -04:00
Jean-Paul Calderone
af3905ac32 Cannot skipsdisk if you don't want usedevelop 2019-05-08 18:42:17 -06:00
Jean-Paul Calderone
383d1361c8 Turn off usedevelop
It produces less useful test results by testing against a "develop"-installed
codebase.  This masks bugs in our setup.py.
2019-05-08 18:42:17 -06:00
meejah
1f5b647bee simplify comment (from review) 2019-04-09 15:35:45 -06:00
meejah
c731473d9e newer towncrier works with py2.7 2019-04-09 15:35:29 -06:00
meejah
23cd5f1526 add a 'draftnews' tox environment 2019-04-09 15:00:12 -06:00
Jean-Paul Calderone
fec5064a2f Get pip and pyinstaller working together. 2019-01-25 10:46:23 -05:00
Jean-Paul Calderone
6d28d08299
Revert "Get pip 19 and pyinstaller 3.4 working together" 2019-01-24 10:33:59 -05:00
Jean-Paul Calderone
007d13d357 watch out when copy/pasting from tox docs 2019-01-23 16:48:34 -05:00
Jean-Paul Calderone
d6bf0d0b25 Try to get pip 19 and pyinstaller 3.4 working together 2019-01-23 16:09:25 -05:00
Jean-Paul Calderone
812125a71f Remove the basepython declaration from the testenv
This works around https://github.com/tox-dev/tox/issues/1020
2019-01-23 11:45:19 -05:00
meejah
821e6c3d07 let 'tahoe -e codechecks' run w/o making local changes 2018-08-27 15:25:48 -06:00
Jean-Paul Calderone
436cb8fda6 A different work-around for the pep 518 mess 2018-08-06 12:13:33 -04:00
Jean-Paul Calderone
70589aab3d attempt to work around the pip build isolation problem 2018-08-06 12:13:33 -04:00
Jean-Paul Calderone
b13f1cc531 try with only one extra 2018-08-06 12:13:33 -04:00
Jean-Paul Calderone
2422b959df absolute minimum documentation 2018-08-06 10:32:16 -04:00
Jean-Paul Calderone
e0e0abf019 Check for the towncrier news fragment as part of the tox codechecks env. 2018-08-06 10:28:45 -04:00
Jean-Paul Calderone
12a36abf63 Attempt to have a cached wheelhouse for pip 2018-07-09 13:36:40 -04:00
Jean-Paul Calderone
1ebc59b2fe our dependency on subunit is via subunitreporter 2018-07-09 11:39:46 -04:00
Jean-Paul Calderone
97bc77d96b Go straight to a file with the subunit2 output.
It's just too hard otherwise.
2018-07-08 18:49:45 -04:00
Jean-Paul Calderone
80027f3ef1 need this in the tox env too 2018-07-06 17:26:11 -04:00
Jean-Paul Calderone
75367adda7 Avoid duplication of some deps 2018-07-06 10:12:44 -04:00
Jean-Paul Calderone
ad35ee498a Make sure we get the extra deps we need 2018-07-05 19:44:49 -04:00
Jean-Paul Calderone
16e4370630 Generate junitxml and give it to CircleCI 2018-07-05 14:19:23 -04:00
Jean-Paul Calderone
531ac8474b Get certifi to fix the underlying problem
Having certifi magically makes setuptools able to talk to PyPI.  Whew!
2018-07-04 20:14:29 -04:00
Jean-Paul Calderone
c45a53590e re-enable full test suite 2018-06-15 13:24:01 -04:00
Jean-Paul Calderone
a4ac9ba9ce Upload the deprecation warning logs as artifacts 2018-06-15 13:20:46 -04:00
Jean-Paul Calderone
933096bdab Spell the test module correctly. 2018-06-15 13:08:40 -04:00
Jean-Paul Calderone
20cf504973 Remove these duplicated pyflakes checks
There is a dedicated `codechecks` environment.  Use that if you want to
do code checks.
2018-06-15 08:44:52 -04:00
Jean-Paul Calderone
c9c62fb076 Remove check-interfaces.py for spuriousness
It reports a bunch of problems with non-Tahoe-LAFS code and nothing with
Tahoe-LAFS code and therefore is not very useful.
2018-06-15 08:44:26 -04:00
Jean-Paul Calderone
36539eb11c [debugging] Temporarily reduce the cost of testing 2018-06-15 08:44:24 -04:00
Jean-Paul Calderone
2bd63ce27a Tell tox to pass the new env var through 2018-04-03 14:07:17 -04:00
Chris Wood
8c81ca7958 Remove 'deps = .' from pyinstaller tox testenv 2018-03-29 14:29:42 -04:00
Chris Wood
c850638537 Fix PyInstaller builds
This commit contains a few small changes to fix PyInstaller frozen
builds (which were recently broken in a few ways by changes introduced
with `tahoe invite`, `tahoe daemonize`, and the addition of "setuptools
>= 28.8.0" to setup_requires) and removes a couple of hacks that are no
longer necessary to create working frozen tahoe executables with
PyInstaller.
2018-03-29 14:11:15 -04:00
Brian Warner
acc2b5744c tox: use newer (tox-2.4) settings, pre-install 'incremental'
* use 'extras' for our `[test]` additions instead of abusing 'deps'
* use 'deps' to pre-install 'incremental', which we couldn't do when we
  filled it with --editable to get `[test]`
* pre-install 'incremental' to work around a bug that strikes on Travis under
  OS-X-10.12 as PyPI gradually disables TLS<1.2. See ticket 2913 for details
* remove redundant configuration lines
* require tox-2.4 or newer, to get 'extras'

refs ticket:2913
https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2913
2018-03-28 17:42:01 -07: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
526b97c753 tox: add 'skipsdist=True', hoping this will fix buildbot
There appears to be a bug in setuptools, triggered by running "python
setup.py sdist" with setuptools==11.3 in that python's environment, on a
project whose setup.py has a setup_requires= that requests setuptools >=
28.8.0. When setuptools is upgraded from inside setup.py, it gets into a
weird hybrid state where it's using setup() keyword-argument plugins from the
newer setuptools, but those plugins reference functions that aren't present
in the older setuptools, and the sdist command fails with an import
error (module object has no attribute 'check_specifier').

We don't actually need the sdist: all our tox test environments use
"skip_install = true", because we install tahoe via the "deps" line (so we
can get the `[test]` extra, and get a faster symlink-ish "editable" install).
That install uses "pip", which uses the pip inside the new virtualenv, which
either uses a newer version of setuptools (dependent upon what version of
"virtualenv" was installed in the parent environment, next to tox) or somehow
allows setuptools to be upgraded without exposing this weird broken hybrid
state.

Either way, skipping the sdist seems to fix this problem.

refs ticket:2910
https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2910
2018-03-27 14:08:17 -07:00
meejah
f7cfd62908 tell travis + tox about pytest.twisted in a different way 2018-01-23 12:52:46 -07:00
tpltnt
ac7287677b importing twisted trial instead of allmydata trial 2018-01-04 22:09:52 +01:00
Chris Wood
aaf167b877 Add support for binary builds with PyInstaller
See https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2729
2017-08-10 12:43:34 -07:00
Jean-Paul Calderone
9429fb8fad Allow some control over trial command run by tox
The TAHOE_LAFS_TRIAL_ARGS environment variable can now be used to pass
arguments to tox.  If it is unset, some sensible defaults will be used.
2017-07-28 11:05:40 -04:00
Brian Warner
1bb62d843f tox docs: pin docutils-0.12
This avoids a bug in the recent docutils-0.13.1 which throws an exception
when encountering links to SVG images. ReadTheDocs currently does the same.
https://sourceforge.net/p/docutils/bugs/301/ is probably the upstream bug.

closes ticket:2847
2016-12-12 12:57:08 -08:00
Vladimir Rusinov
dcec018cdf Set minimal tox version to 1.7.
Current LTS Ubuntu ships with 1.6.0 which seems to fail with "Directory
'.' is not installable. File 'setup.py' not found.". Search shows that
it looks like 1.7 is not affected by this
(https://bugs.launchpad.net/cinder/+bug/1484035), although I've only
tested with tox 2.5.0.

Should fix https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2841
2016-11-23 12:40:22 +00:00
Brian Warner
1f09e8f3ce tox -e coverage: build coverage.xml too
This is handy for my see-coverage-in-emacs workflow.
2016-10-08 21:23:05 -04:00
meejah
37062d1307 tell travis to run integration (but only on linux) 2016-09-26 13:33:45 -07:00
meejah
72f17afa76 Move check_magicfolder_smoke.py to proper integration tests
This introduces a py.test-based integration suite (currently just
containing magic-folder end-to-end tests). Also adds a tox environment
("integration") to run them.

The test setup is:

 - a "flogtool gather" instance
 - an Introducer
 - five Storage nodes
 - Alice and Bob client nodes
 - Alice and Bob have paired magic-folders
2016-08-30 20:47:47 -06: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
Brian Warner
fa28ed0730 tox: add pyflakes, which was accidentally removed from CI 2016-07-19 17:30:50 -07:00
Brian Warner
608719df91 tox: add "coverage" environment
Run with "tox -e coverage". Uses a new helper
module (allmydata.test.run_trial) to let us import+execute trial without
knowing exactly where the "trial" binary lives, which helps with using
"coverage run" under tox.
2016-05-09 14:32:21 -07:00
Brian Warner
1e1e86fe35 tox.ini: skip default install
We use "--deps = --editable=.[test]" to achieve three goals:

* make tahoe and it's dependencies available for tests
* use --editable, which is faster and allows "coverage run" to get the
  source filenames right
* use the [test] extra, which includes "mock"

Tox's default install command does the first, but doesn't use
--editable, so when the "deps" stage comes around, there's already a
non-editable install in place. It seems to get the [test] extra right,
but it doesn't wind up with an editable install.

So we disable the default install command and rely on the "deps" clause
instead.
2016-05-09 13:56:06 -07:00
Brian Warner
c97e8520f4 tox.ini: use --editable to work around old-pip bug
One of the buildslaves (Ubuntu wily 15.10) has a very old pip-1.5.6,
which doesn't know how to "pip install" a filepath+extra (like
".[test]") unless --editable is also used.

It's convenient to have --editable set anyways (so you can do subsequent
narrow testing without re-running tox, by running ".tox/py27/bin/trial
TESTCASE" or use .tox/py27/bin/activate), so changing the dependency
from ".[test]" to "--editable=.[test]" is the easiest way to work around
that older buildslave. (I could also have upgraded the buildslave to use
a newer pip, but 15.10 is pretty recent and other people will probably
hit this too, so this way it's fixed for everybody).

refs ticket:2776
2016-04-12 14:28:02 -07:00
Brian Warner
23f871a409 add [test] "extra" to install testing-only dependencies
closes ticket:2776
2016-04-12 12:32:46 -07:00
Brian Warner
a8161028d6 tox upcoming-deprecations: emit foolscap/twisted versions
Note that Twisted doesn't do anything like Versioneer, so this will
generally show e.g. "Twisted-16.1.0" for the entire interval between
16.1.0 and 16.2.0.
2016-04-06 13:37:56 -10:00
Brian Warner
9d20de3db9 improve run-deprecations script
Rewrote in Twisted, which lets us read/scan/print all log lines in
realtime. The output is now correctly interleaved (as well as
maintaining the stdout-vs-stderr of each message). The renamed
--warnings= logfile records all relevant lines from *both* stdout and
stderr (i.e. any that includes "DeprecationWarning"), which handles a
change (perhaps in recent Twisteds?) that emits these warnings on stdout
instead of stderr.
2016-04-06 11:07:06 -10:00
Brian Warner
d5e1b21a8a tox: add "upcoming-deprecations" environment
This runs trial against the latest (git) Twisted and Foolscap, to give
us an early warning about anything we're currently doing that will
become deprecated in their next releases.
2016-04-06 09:24:15 -10:00
Brian Warner
14c513db8a tox -e deprecations: add helper script to make it work
Tox doesn't run shell pipelines, and is unhappy about running tools that
it didn't install itself (including non-python things like "make"). So
this adds misc/build_helpers/run-deprecations.py, a python script that
runs a given command (i.e. trial) and writes stdout into a separate file
where the buildbot can see it, and counts the "DeprecationWarning" lines
from the file to decide the returncode.

This ought to improve the status display on the buildbot "test
deprecations" step.
2016-04-06 08:29:48 -10:00
Brian Warner
dfc09745a0 add 'tox -e docs', to check+render .rst files 2016-03-31 15:59:49 -07:00
Brian Warner
35ef8b4c71 tox.ini: fix spelling of DeprecationWarning 2016-03-27 14:59:20 -07:00
Brian Warner
0cc48878e0 tox: use python2.7 for deprecations 2016-03-27 12:05:18 -07:00
Brian Warner
42ede22f1e tox: run tahoe --version for buildbot, remove update_version
Our setup.cfg ensures that 'setup.py update_version' happens early
enough. And doing it from tox's commands= is too late anyways (because
we aren't using Versioneer, so the _version.py file must be updated
before tox installs a static copy into the virtualenv).

The buildbot's main run-trial-with-tox command has been updated to scan
for the 'tahoe --version' output and include the version string in the
buildbot results.
2016-03-17 22:01:33 -07:00
Brian Warner
0f3ce7a17f setup.py: remove 'make_executable' command 2016-03-15 18:19:54 -07: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
e052134309 add initial tox support
This adds support for two environments: 'py27' for basic tests, and
'deprecations' to run tests with deprecation warnings turned on (the
latter is meant to be run from a buildbot step that knows how to count
and format the warnings nicely).
2016-03-08 21:16:36 -08:00