]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume/tests: speed up tox tests
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 14 Mar 2022 14:40:47 +0000 (14:40 +0000)
committerAdam King <adking@redhat.com>
Tue, 17 May 2022 14:25:59 +0000 (10:25 -0400)
Let's use `--numprocesses=auto` in order to speed up the unit tests execution.

See the difference, without `--numprocesses=auto`:
```

... omitted output ...

real    1m22.884s
user    0m23.003s
sys     0m20.504s
```

with `--numprocesses=auto`:

```

... omitted output ...

real    0m18.767s
user    0m33.056s
sys     0m23.244s
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit cd5eb7939ed92b584c45689a3169847811b8518d)

src/ceph-volume/tox.ini

index 6ccf3e775caadb0708c2c341475b64fdf3e650bd..4a7e9af1f10bc8f71b48f1b716a7e25fedc7df47 100644 (file)
@@ -5,9 +5,10 @@ skip_missing_interpreters = true
 [testenv]
 deps=
   pytest
+  pytest-xdist
   mock
 install_command=./tox_install_command.sh {opts} {packages}
-commands=py.test -v {posargs:ceph_volume/tests} --ignore=ceph_volume/tests/functional
+commands=py.test --numprocesses=auto -vv {posargs:ceph_volume/tests} --ignore=ceph_volume/tests/functional
 
 [testenv:py3-flake8]
 deps=flake8