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.
This commit is contained in:
Jean-Paul Calderone 2017-07-26 10:25:38 -04:00
parent a4be2dce71
commit 9429fb8fad
2 changed files with 13 additions and 8 deletions

View File

@ -46,6 +46,11 @@ To run the unit test suite:
* ``tox``
You can pass arguments to ``trial`` with an environment variable. For
example, you can run the test suite on multiple cores to speed it up:
* ``TAHOE_LAFS_TRIAL_ARGS="-j4" tox``
For more detailed instructions, read `<docs/INSTALL.rst>`_ .
Once ``tahoe --version`` works, see `<docs/running.rst>`_ to learn how to set

16
tox.ini
View File

@ -8,14 +8,14 @@ envlist = py27
minversion = 1.7
[testenv]
passenv = USERPROFILE HOMEDRIVE HOMEPATH
passenv = TAHOE_LAFS_TRIAL_ARGS USERPROFILE HOMEDRIVE HOMEPATH
# the default install is non-(--editable), and would displace our -e .[test]
skip_install = True
deps = --editable=.[test]
commands =
pyflakes src static misc setup.py
tahoe --version
trial --rterrors {posargs:allmydata}
trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors} {posargs:allmydata}
[testenv:integration]
commands =
@ -24,13 +24,13 @@ commands =
[testenv:coverage]
# coverage (with --branch) takes about 65% longer to run
passenv = USERPROFILE HOMEDRIVE HOMEPATH
passenv = TAHOE_LAFS_TRIAL_ARGS USERPROFILE HOMEDRIVE HOMEPATH
skip_install = True
deps = --editable=.[test]
commands =
pyflakes src static misc setup.py
tahoe --version
coverage run --branch -m allmydata.test.run_trial --rterrors --reporter=timing {posargs:allmydata}
coverage run --branch -m allmydata.test.run_trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors --reporter=timing} {posargs:allmydata}
coverage xml
[testenv:codechecks]
@ -49,17 +49,17 @@ commands =
[testenv:deprecations]
basepython=python2.7
passenv = USERPROFILE HOMEDRIVE HOMEPATH
passenv = TAHOE_LAFS_TRIAL_ARGS USERPROFILE HOMEDRIVE HOMEPATH
skip_install = True
deps = --editable=.[test]
setenv =
PYTHONWARNINGS=default::DeprecationWarning
commands =
python misc/build_helpers/run-deprecations.py --warnings=_trial_temp/deprecation-warnings.log trial --rterrors {posargs:allmydata}
python misc/build_helpers/run-deprecations.py --warnings=_trial_temp/deprecation-warnings.log trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors} {posargs:allmydata}
[testenv:upcoming-deprecations]
basepython=python2.7
passenv = USERPROFILE HOMEDRIVE HOMEPATH
passenv = TAHOE_LAFS_TRIAL_ARGS USERPROFILE HOMEDRIVE HOMEPATH
setenv =
PYTHONWARNINGS=default::DeprecationWarning
skip_install = True
@ -69,7 +69,7 @@ deps =
git+https://github.com/warner/foolscap
commands =
flogtool --version
python misc/build_helpers/run-deprecations.py --warnings=_trial_temp/deprecation-warnings.log trial --rterrors {posargs:allmydata}
python misc/build_helpers/run-deprecations.py --warnings=_trial_temp/deprecation-warnings.log trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors} {posargs:allmydata}
[testenv:checkmemory]
commands =