-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
This is an attempt to fix fedora-python#45 It does the following: * uses pytest-xdist to paralellize the tests (3 workers) * utilizes custom scheduler that splits the tests according to the fixture name * this is needed not to use 1 fixture on multiple workers see pytest-dev/pytest-xdist#18 * use parametrize an all integration tests to enable our hackish scheduler * mock now creates the roots in pwd (not to pollute the filesystem on /) * note that the roots can take several GBs
Even on Travis Ci this is slightly faster. On my machine, it got from ~9 minutes to ~4. |
pyyaml | ||
basepython = python3 | ||
commands = python -m pytest -v {posargs} test/integration | ||
commands = python -m pytest -v -n3 {posargs} test/integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using more is very heavy on disc usage.
|
||
config_opts['chroot_setup_cmd'] = 'install ansible dnf' | ||
config_opts['use_host_resolv'] = True | ||
config_opts['rpmbuild_networking'] = True | ||
config_opts['use_nspawn'] = False | ||
config_opts['root'] = 'fedora-27-x86_64-taskotron' | ||
config_opts['root'] = 'taskotron-python-versions-master' | ||
config_opts['plugin_conf']['root_cache_opts']['dir'] = "%(cache_topdir)s/taskotron-python-versions/root_cache/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sure all our mock roots share one root cache
Added an unrelated hotfix. But I was lazy to rebase this on top of it. |
@kparal Could you please just tell me whether this works for you and whether it's at least a bit faster? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried this change on my machine, and it works, the tests run fine. The improvement for integration tests was very slight, from ~8 min to ~7 min.
Thanks @irushchyshyn what happens if you run it for the second time? |
It was the second time. For the first time it took ~10 mins for integration tests. But I realised I was running it with only 1 CPU 😊 I increased the number of CPU to 4 (I currently run Fedora in a VM) and it took ~4 min for integration tests (compared to ~8 mins on develop branch ) Twice as fast 👍 |
Before patch:
That currently fails in After patch:
and
No failures. |
Thank you both. |
This has been a horror.