Add --no-loadscope-reorder and --loadscope-reorder options (#1217)

Based on #1098.

Closes #1098

---------

Co-authored-by: Toan Vuong <toan.vuong@hyperscience.com>
This commit is contained in:
darwintree
2025-06-30 21:59:40 +08:00
committed by GitHub
parent 532f07fb18
commit 9d7ba5b5fb
4 changed files with 58 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
Add ``--no-loadscope-reorder`` and ``--loadscope-reorder`` option to control whether to automatically reorder tests in loadscope for tests where relative ordering matters. This only applies when using ``loadscope``.
For example, [test_file_1, test_file_2, ..., test_file_n] are given as input test files, if ``--no-loadscope-reorder`` is used, for either worker, the ``test_file_a`` will be executed before ``test_file_b`` only if ``a < b``.
The default behavior is to reorder the tests to maximize the number of tests that can be executed in parallel.