You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by em...@apache.org on 2017/07/10 15:08:15 UTC

incubator-ariatosca git commit: ARIA-76 Parallelize PyTest

Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-76-parallel-pytest [created] b2310536e


ARIA-76 Parallelize PyTest

Use the PyTest xdist plugin to parallelize tests in boxed subprocesses.
Through benchmarking we discovered that paralellizing on the number of
CPU cores ("-n auto") provides the best times.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b2310536
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b2310536
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b2310536

Branch: refs/heads/ARIA-76-parallel-pytest
Commit: b2310536e00894ec781cd12ee20a620257cbb437
Parents: f903006
Author: Tal Liron <ta...@gmail.com>
Authored: Mon Jul 10 18:06:05 2017 +0300
Committer: Tal Liron <ta...@gmail.com>
Committed: Mon Jul 10 18:06:05 2017 +0300

----------------------------------------------------------------------
 tests/requirements.txt |  1 +
 tox.ini                | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2310536/tests/requirements.txt
----------------------------------------------------------------------
diff --git a/tests/requirements.txt b/tests/requirements.txt
index cf57821..94b263c 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -19,3 +19,4 @@ pylint==1.6.4
 pytest==3.0.2
 pytest-cov==2.3.1
 pytest-mock==1.2
+pytest-xdist==1.18.1

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b2310536/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index 9849b5e..f165b5a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -36,27 +36,27 @@ basepython=
   docs: python2.7
 
 [testenv:py27]
-commands=pytest tests --ignore=tests/end2end --ignore=tests/orchestrator/execution_plugin/test_ssh.py --cov-report term-missing --cov aria
+commands=pytest tests -n auto --ignore=tests/end2end --ignore=tests/orchestrator/execution_plugin/test_ssh.py --cov-report term-missing --cov aria
 
 [testenv:py26]
-commands=pytest tests --ignore=tests/end2end --ignore=tests/orchestrator/execution_plugin/test_ssh.py --cov-report term-missing --cov aria
+commands=pytest tests -n auto --ignore=tests/end2end --ignore=tests/orchestrator/execution_plugin/test_ssh.py --cov-report term-missing --cov aria
 
 [testenv:py27e2e]
-commands=pytest tests/end2end --cov-report term-missing --cov aria
+commands=pytest tests/end2end -n auto --cov-report term-missing --cov aria
 
 [testenv:py26e2e]
-commands=pytest tests/end2end --cov-report term-missing --cov aria
+commands=pytest tests/end2end -n auto --cov-report term-missing --cov aria
 
 [testenv:pywin]
-commands=pytest tests --ignore=tests/end2end --ignore=tests/orchestrator/execution_plugin/test_ssh.py --cov-report term-missing --cov aria
+commands=pytest tests -n auto --ignore=tests/end2end --ignore=tests/orchestrator/execution_plugin/test_ssh.py --cov-report term-missing --cov aria
 
 [testenv:py27ssh]
 install_command=pip install {opts} {packages} .[ssh]
-commands=pytest tests/orchestrator/execution_plugin/test_ssh.py
+commands=pytest tests/orchestrator/execution_plugin/test_ssh.py -n auto
 
 [testenv:py26ssh]
 install_command=pip install {opts} {packages} .[ssh]
-commands=pytest tests/orchestrator/execution_plugin/test_ssh.py
+commands=pytest tests/orchestrator/execution_plugin/test_ssh.py -n auto
 
 [testenv:pylint_code]
 commands=pylint --rcfile=aria/.pylintrc --disable=fixme,missing-docstring aria extensions/aria_extension_tosca/