aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-10 16:03:54 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-10 16:03:54 +1200
commitbac3e87538d5398eb637fb26560705886c4fcfd1 (patch)
treeef752b46fa6a3ff2c9f8e924b53caab1e54168ec /tox.ini
parent11fb21719179f243b9f2a069cba42c1d7f3722c0 (diff)
downloadmitmproxy-bac3e87538d5398eb637fb26560705886c4fcfd1.tar.gz
mitmproxy-bac3e87538d5398eb637fb26560705886c4fcfd1.tar.bz2
mitmproxy-bac3e87538d5398eb637fb26560705886c4fcfd1.zip
Distinguish between CI and interactive versions of tox
- This patch changes tox so that local invocation runs the tests with paralellism, coverage disabled, and without attempting to report coverage upstream. - You can now run specific tests for the py27 environment: tox -e py27 ./path/to/my/test We can't do this for py35 just yet, because of our junk filter, and the fact that we specify which tests to run directly in the conf file. Once these are cleaned up, we can extend.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini14
1 files changed, 13 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index d1b02463..2ae4a8a9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,11 +9,23 @@ passenv = CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_
[testenv:py27]
commands =
+ py.test -n 8 --color=yes --timeout 60 []
+
+[testenv:py35]
+# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
+whitelist_externals = bash
+commands =
+ bash -c 'set -o pipefail ; py.test -n 8 --color=yes --timeout 60 test/netlib test/mitmproxy/script test/pathod/test_utils.py test/pathod/test_log.py test/pathod/test_language_generators.py test/pathod/test_language_writer.py test/pathod/test_language_base.py test/pathod/test_language_http.py test/pathod/test_language_websocket.py test/pathod/test_language_http2.py 2>&1 | grep -v Cryptography_locking_cb'
+
+[testenv:py27-ci]
+basepython = python2.7
+commands =
py.test --cov netlib --cov mitmproxy --cov pathod --color=yes --timeout 60 ./test
codecov -e TOXENV
-[testenv:py35]
+[testenv:py35-ci]
# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
+basepython = python3.5
whitelist_externals = bash
commands =
bash -c 'set -o pipefail ; py.test --cov netlib --cov mitmproxy --cov pathod --color=yes --timeout 60 test/netlib test/mitmproxy/script test/pathod/test_utils.py test/pathod/test_log.py test/pathod/test_language_generators.py test/pathod/test_language_writer.py test/pathod/test_language_base.py test/pathod/test_language_http.py test/pathod/test_language_websocket.py test/pathod/test_language_http2.py 2>&1 | grep -v Cryptography_locking_cb'