You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test execution ordering: regroup by axis/package to reduce fixture churn
pytest's default ordering could interleave image_format=vhd/qcow2
tests in a way that repeatedly destroys and recreates SRs.
It could also choose to cross package boundaries as an attempt to
optimize test runs, but we'd prefer to see tests logically grouped,
for easier log analysis and fixture management (which is perfectible
and which we'll have to improve anyway).
We start with pytest's computed ordering, then regroup tests by
parametrized axis (currently only image_format) and by leaf python
package, in order to keep related tests together and reduce needless
costly context switching.
Axis-less tests intentionally share the same ordering level as the
first parametrized axis so they stay near their original position
instead of being grouped at the beginning of the run.
Interfering with pytest's ordering is not something to do lightly, so
it's possible that we may discover issues caused by this. But meanwhile,
this has shown a notable reduction (10%) of the number of setup/teardown
operations when both vhd and qcow2 image formats are set, and test order
closer to what we'd intuitively expect.
Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
0 commit comments