Commit 4dd71edb authored by Phil Dawson's avatar Phil Dawson

Move external plugin tests to seperate tox environment.

Having the external plugins in the same tox env as the internal tests
is inconvenient for developers. Move the external tests into their own

In order to run the external tests locally, append `-external` to an
environment name. For example tox -e py35-external.
parent 2c3dfa4e
Pipeline #51657715 passed with stages
in 113 minutes and 49 seconds
......@@ -12,7 +12,9 @@ stages:
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"
EXTERNAL_TESTS_COMMAND: "tox -e py{35,36,37}-external -- ${PYTEST_ARGS}"
......@@ -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}"
......@@ -2,7 +2,7 @@
# Tox global configuration
envlist = py35,py36,py37
envlist = py{35,36,37}
skip_missing_interpreters = true
......@@ -13,15 +13,13 @@ skip_missing_interpreters = true
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/ {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/ {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/ {envtmpdir} {posargs}
py{35,36,37}-!external-nocover: pytest --basetemp {envtmpdir} {posargs}
external-nocover: {envpython} {toxinidir}/tests/ {envtmpdir} {posargs}
deps =
py{35,36,37}: -rrequirements/requirements.txt
py{35,36,37}: -rrequirements/dev-requirements.txt
......@@ -51,29 +49,6 @@ whitelist_externals =
# Run only the tests that we use form external plugins
commands =
{envpython} {toxinidir}/tests/ {envtmpdir} {posargs}
deps =
# Run only the tests which are defined by the BuildStream project
commands =
pytest --basetemp {envtmpdir} {posargs}
deps =
# Coverage reporting
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment