diff options
author | Phil Dawson <phil.dawson@codethink.co.uk> | 2019-03-12 18:08:19 +0000 |
---|---|---|
committer | Phil Dawson <phil.dawson@codethink.co.uk> | 2019-03-13 10:10:03 +0000 |
commit | 16289336ea9fff89c3a0eed3a4477186a5459746 (patch) | |
tree | 7c3246bf4500f7e177c538ec32f7cf1bcb1d90d9 | |
parent | bc96d007991a44c8fcf6fbe46fcf4e3eaa0cc728 (diff) | |
download | buildstream-phil/fixup-external-plugin-tests.tar.gz |
Move external plugin tests to seperate tox environment.phil/fixup-external-plugin-tests
Having the external plugins in the same tox env as the internal tests
is inconvenient for developers. Move the external tests into their own
environment.
-rw-r--r-- | .gitlab-ci.yml | 5 | ||||
-rw-r--r-- | tox.ini | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a494a2b34..7e0bfefe9 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 -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: @@ -14,14 +14,10 @@ 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/external_plugins.py {envtmpdir} --cov=buildstrean --cov-append {posargs} py{35,36,37}-!nocover: mkdir -p .coverage-reports 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} deps = py{35,36,37}: -rrequirements/requirements.txt py{35,36,37}: -rrequirements/dev-requirements.txt @@ -56,7 +52,8 @@ whitelist_externals = # [testenv:external] commands = - {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} {posargs} + {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} {envtmpdir} --cov=buildstream --cov-append {posargs} {posargs} + mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname} deps = -rrequirements/requirements.txt -rrequirements/dev-requirements.txt |