mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 02:10:59 +00:00
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.
This commit is contained in:
parent
11fb217191
commit
bac3e87538
12
.travis.yml
12
.travis.yml
@ -14,15 +14,15 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
env: TOXENV=py27
|
env: TOXENV=py27-ci
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
env: TOXENV=py27 NO_ALPN=1
|
env: TOXENV=py27-ci NO_ALPN=1
|
||||||
- python: 3.5
|
- python: 3.5
|
||||||
env: TOXENV=py35
|
env: TOXENV=py35-ci
|
||||||
- python: 3.5
|
- python: 3.5
|
||||||
env: TOXENV=py35 NO_ALPN=1
|
env: TOXENV=py35-ci NO_ALPN=1
|
||||||
- language: generic
|
- language: generic
|
||||||
env: TOXENV=py27
|
env: TOXENV=py27-ci
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode7.1
|
osx_image: xcode7.1
|
||||||
git:
|
git:
|
||||||
@ -40,9 +40,9 @@ install:
|
|||||||
brew outdated openssl || brew upgrade openssl
|
brew outdated openssl || brew upgrade openssl
|
||||||
brew install python
|
brew install python
|
||||||
fi
|
fi
|
||||||
|
- pip install tox tox-travis
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- "pip install tox"
|
|
||||||
- "tox -e lint"
|
- "tox -e lint"
|
||||||
|
|
||||||
script: tox
|
script: tox
|
||||||
|
16
tox.ini
16
tox.ini
@ -9,12 +9,24 @@ passenv = CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_
|
|||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
commands =
|
commands =
|
||||||
py.test --cov netlib --cov mitmproxy --cov pathod --color=yes --timeout 60 ./test
|
py.test -n 8 --color=yes --timeout 60 []
|
||||||
codecov -e TOXENV
|
|
||||||
|
|
||||||
[testenv:py35]
|
[testenv:py35]
|
||||||
# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
|
# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
|
||||||
whitelist_externals = bash
|
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-ci]
|
||||||
|
# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
|
||||||
|
basepython = python3.5
|
||||||
|
whitelist_externals = bash
|
||||||
commands =
|
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'
|
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'
|
||||||
codecov -e TOXENV
|
codecov -e TOXENV
|
||||||
|
Loading…
Reference in New Issue
Block a user