trezor-firmware
trezor-firmware copied to clipboard
Run device tests in parallel
A single run of the device test suite takes ~10 minutes for trezor-core, or ~3 minutes for legacy. During this time, most of your CPU cores are idling. There is a low-hanging-fruit speedup to be gained by parallelizing the test suite.
Packages like pytest-xdist can do that basically for free.
This is Not That Easy for a bunch of solvable reasons:
- Currently the tests do not launch their own emulator. (Also, for hardware tests, we don't want tests to launch their own emulator.) This means only one instance is running, so only one test can be executed. We would need to add an ability to the test harness to launch multiple emulators on non-conflicting ports with non-conflicting profile directories (and separate UI test output).
- Certain parts of UI test collection rely on having all the data from the test run available. We would need to improve the whole thing.
- ??? more?