Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pytest on top of unittest to allow multi-proc execution #714

Merged
merged 2 commits into from Sep 15, 2021

Conversation

hugsy
Copy link
Owner

@hugsy hugsy commented Sep 12, 2021

Use pytest for CI

Description/Motivation/Screenshots

This PR is background work for the self-hosting CI runners that will allow to test non-x86 archs (although GH Actions only offers ARM & AARCH64 for now).

Since each unittest we do is totally independent from one another, we can massively improve the time wasted spent in CI testing by splitting on more cores. That's exactly the point of this PR: make use of pytest + pytest-xdist on top of unittest to distribute the tests. New test time is (roughly) the old divided by the number of cores given.

How Has This Been Tested?

Architecture Yes/No Comments
x86-32 ✔️
x86-64 ✔️
ARM ✖️
AARCH64 ✔️
MIPS ✖️
POWERPC ✖️
SPARC ✖️
RISC-V ✖️
make test ✔️

Checklist

  • My PR was done against the dev branch, not master.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • My change adds tests as appropriate.
  • I have read and agree to the CONTRIBUTING document.

tests/runtests.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@theguy147 theguy147 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hugsy hugsy added this to the Release: next milestone Sep 13, 2021
@hugsy hugsy merged commit 90ffa6b into dev Sep 15, 2021
@hugsy hugsy deleted the unittests-pytest branch September 15, 2021 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants