diff options
author | Emma Foley <emma.l.foley@intel.com> | 2017-11-07 20:29:03 +0000 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2017-11-17 17:19:12 +0000 |
commit | 29476ed0317dcc635dff67d2fc9fd68233aa6656 (patch) | |
tree | cd389611cc1f2157b2d653dd834d39b1234a0586 /tox.ini | |
parent | 44070670c798d2cde2824f3150b2b11bf35c6319 (diff) |
tox: Split tests into separate tox environments
* Add argument parsing to run_tests.sh so tests can be selected
* Define tox environments for:
* Coverage
* Unit tests
* Functional tests
* for py27 and py3
* Add environments to default env
* Behaviour is the same when the tests are run
* Updates the py27 environment config, and adds a py3 config.
* Commands from testenv are moved to py27
* py3 env uses the same commands, but runs with python3
Change-Id: I22f17c0103101f01ec268b1de9d146780ae67a6d
JIRA: YARDSTICK-837
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -1,7 +1,7 @@ [tox] minversion = 2.0 skipsdist = True -envlist = py27,py3,pep8 +envlist = py{27,3},pep8,functional{,-py3},coverage [testenv] usedevelop=True @@ -9,13 +9,15 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = /bin/bash ./run_tests.sh whitelist_externals = /bin/bash [testenv:py27] -# don't re-run coverage on both py27 py3, it takes too long -setenv = - SKIP_COVERAGE=1 +commands = + /bin/bash ./run_tests.sh --unit + +[testenv:py3] +basepython = python3 +commands = {[testenv:py27]commands} [testenv:pep8] # for gate testing, scans only the files changed in the last commit @@ -27,6 +29,19 @@ commands = commands = /bin/bash tools/coding-checks.sh --pylint '{posargs}' +[testenv:coverage] +basepython = python3 +commands = + /bin/bash ./run_tests.sh --coverage + +[testenv:functional] +commands = + /bin/bash ./run_tests.sh --functional + +[testenv:functional-py3] +basepython = python3 +commands = {[testenv:functional]commands} + [testenv:os-requirements] commands = python {toxinidir}/tools/os-requirements-check.py {envdir} |