diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-13 16:54:33 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-13 16:54:33 +0000 |
commit | e4aace8d300a75aaebf9f7c2b87e53fab20478b3 (patch) | |
tree | a115bb620b3e1c506d3bfd54a38fba5b3094dd4d | |
parent | 2c3dfa4e1b92ead066b3fa25fe7c3037b4ba6c58 (diff) | |
parent | 4dd71edbea76c0c68b2ea4b77613e463bca1e8e0 (diff) | |
download | buildstream-e4aace8d300a75aaebf9f7c2b87e53fab20478b3.tar.gz |
Merge branch 'phil/fixup-external-plugin-tests' into 'master'
Move external plugin tests to seperate tox environment.
See merge request BuildStream/buildstream!1224
-rw-r--r-- | .gitlab-ci.yml | 5 | ||||
-rw-r--r-- | tox.ini | 35 |
2 files changed, 9 insertions, 31 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a494a2b34..c4d2c864a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,9 @@ stages: variables: PYTEST_ADDOPTS: "--color=yes" INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache" - TEST_COMMAND: "tox -- --color=yes --integration -n 2" + PYTEST_ARGS: "--color=yes --integration -n 2" + TEST_COMMAND: "tox -- ${PYTEST_ARGS}" + EXTERNAL_TESTS_COMMAND: "tox -e py{35,36,37}-external -- ${PYTEST_ARGS}" COVERAGE_PREFIX: "${CI_JOB_NAME}." @@ -38,6 +40,7 @@ variables: # Run the tests as a simple user to test for permission issues - su buildstream -c "${TEST_COMMAND}" + - su buildstream -c "${EXTERNAL_TESTS_COMMAND}" after_script: except: @@ -2,7 +2,7 @@ # Tox global configuration # [tox] -envlist = py35,py36,py37 +envlist = py{35,36,37} skip_missing_interpreters = true # @@ -13,15 +13,13 @@ skip_missing_interpreters = true [testenv] commands = # Running with coverage reporting enabled - py{35,36,37}-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs} - py{35,36,37}-!nocover: pip3 install -e {toxinidir} - py{35,36,37}-!nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} --cov=buildstrean --cov-append {posargs} + py{35,36,37}-!external-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs} py{35,36,37}-!nocover: mkdir -p .coverage-reports + external-!nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} --cov=buildstream --cov-append {posargs} py{35,36,37}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname} # Running with coverage reporting disabled - py{35,36,37}-nocover: pytest --basetemp {envtmpdir} {posargs} - py{35,36,37}-nocover: pip3 install -e {toxinidir} - py{35,36,37}-nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} {posargs} + py{35,36,37}-!external-nocover: pytest --basetemp {envtmpdir} {posargs} + external-nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} {posargs} deps = py{35,36,37}: -rrequirements/requirements.txt py{35,36,37}: -rrequirements/dev-requirements.txt @@ -52,29 +50,6 @@ whitelist_externals = mkdir # -# Run only the tests that we use form external plugins -# -[testenv:external] -commands = - {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} {posargs} -deps = - -rrequirements/requirements.txt - -rrequirements/dev-requirements.txt - -rrequirements/plugin-requirements.txt - - -# -# Run only the tests which are defined by the BuildStream project -# -[testenv:internal] -commands = - pytest --basetemp {envtmpdir} {posargs} -deps = - -rrequirements/requirements.txt - -rrequirements/dev-requirements.txt - -rrequirements/plugin-requirements.txt - -# # Coverage reporting # [testenv:coverage] |