|
3 | 3 |
|
4 | 4 |
|
5 | 5 | class LoadGroupScheduling(LoadScopeScheduling): |
6 | | - """Implement load scheduling across nodes, but grouping test only has group mark. |
| 6 | + """Implement load scheduling across nodes, but grouping test by xdist_group mark. |
7 | 7 |
|
8 | | - This distributes the tests collected across all nodes so each test is run |
9 | | - just once. All nodes collect and submit the list of tests and when all |
10 | | - collections are received it is verified they are identical collections. |
11 | | - Then the collection gets divided up in work units, grouped by group mark |
12 | | - (If there is no group mark, it is itself a group.), and those work units |
13 | | - et submitted to nodes. Whenever a node finishes an item, it calls |
14 | | - ``.mark_test_complete()`` which will trigger the scheduler to assign more |
15 | | - work units if the number of pending tests for the node falls below a low-watermark. |
16 | | -
|
17 | | - When created, ``numnodes`` defines how many nodes are expected to submit a |
18 | | - collection. This is used to know when all nodes have finished collection. |
19 | | -
|
20 | | - This class behaves very much like LoadScopeScheduling, |
21 | | - but with a itself or group(by marked) scope. |
| 8 | + This class behaves very much like LoadScopeScheduling, but it groups tests by xdist_group mark |
| 9 | + instead of the module or class to which they belong to. |
22 | 10 | """ |
23 | 11 |
|
24 | 12 | def __init__(self, config, log=None): |
@@ -49,10 +37,9 @@ def _split_scope(self, nodeid): |
49 | 37 | example/loadsuite/test/test_gamma.py::test_beta0@gname |
50 | 38 | example/loadsuite/test/test_delta.py::Gamma1::test_gamma0@gname |
51 | 39 |
|
52 | | - This function will group tests with the scope determined by splitting |
53 | | - the first ``@`` from the right. That is, test will be grouped in a |
54 | | - single work unit when they have same group name. |
55 | | - In the above example, scopes will be:: |
| 40 | + This function will group tests with the scope determined by splitting the first ``@`` |
| 41 | + from the right. That is, test will be grouped in a single work unit when they have |
| 42 | + same group name. In the above example, scopes will be:: |
56 | 43 |
|
57 | 44 | example/loadsuite/test/test_beta.py::test_beta0 |
58 | 45 | example/loadsuite/test/test_delta.py::Delta1::test_delta0 |
|
0 commit comments