#1521 Tests: allow running integration tests in parallel
Merged 4 years ago by csomh. Opened 4 years ago by csomh.
csomh/fm-orchestrator parallel-test-run  into  master

@@ -35,4 +35,9 @@ 

  

      REQUESTS_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt tox -e integration

  

+ ``MBS_TEST_WORKERS`` can be used to run the tests in parallel. For example to

+ have 4 tests running in parallel one could call::

+ 

+     MBS_TEST_WORKERS=4 tox -e integration

+ 

  .. _tests/integration/example.test.env.yaml: example.test.env.yaml

file modified
+3 -2
@@ -73,11 +73,12 @@ 

      kobo

      koji

      pytest

+     pytest-xdist

      PyYAML

      requests

      sh

  # Set this to /etc/pki/tls/certs/ca-bundle.crt, for example,

  # if the instance tested has a self-signed certificate.

- passenv = REQUESTS_CA_BUNDLE MBS_TEST_CONFIG

+ passenv = REQUESTS_CA_BUNDLE MBS_TEST_CONFIG MBS_TEST_WORKERS

  commands =

-     pytest -vv --confcutdir=tests/integration {posargs:tests/integration}

+     pytest -vv --confcutdir=tests/integration -n {env:MBS_TEST_WORKERS:0} {posargs:tests/integration}