@@ -270,6 +270,13 @@ def _create_test_sets(self, iteration=0):
270
270
# create all TestSet objects
271
271
universal_modes = self .config ['modes' ]
272
272
for set_name , set_info in self .config ['test_sets' ].items ():
273
+ # Checks if the simultaneous key is set inside the test_set, if so, simultaneous limit
274
+ # set in the test_set will override the simultaneous key at the full series level
275
+ if set_info ['simultaneous' ]:
276
+ _simultaneous = set_info ['simultaneous' ]
277
+ else :
278
+ _simultaneous = self .simultaneous
279
+
273
280
set_obj = TestSet (
274
281
pav_cfg = self .pav_cfg ,
275
282
name = set_name ,
@@ -283,7 +290,7 @@ def _create_test_sets(self, iteration=0):
283
290
parents_must_pass = set_info ['depends_pass' ],
284
291
overrides = self .config .get ('overrides' , []),
285
292
status = self .status ,
286
- simultaneous = self . simultaneous ,
293
+ simultaneous = _simultaneous ,
287
294
outfile = self .outfile ,
288
295
verbosity = self .verbosity ,
289
296
ignore_errors = self .ignore_errors ,
@@ -510,9 +517,10 @@ def _run_set(self, test_set: TestSet, build_only: bool, rebuild: bool, local_bui
510
517
"in series {}."
511
518
.format (ktests , len (started_tests ),
512
519
test_set .name , self .sid ))
513
-
520
+ # If simultaneous is set in the test_set, use that.
521
+ _simultaneous = test_set .simultaneous if test_set .simultaneous else self .simultaneous
514
522
# Wait for jobs until enough have finished to start a new batch.
515
- while tests_running + self .batch_size > self . simultaneous :
523
+ while tests_running + self .batch_size > _simultaneous :
516
524
tests_running -= test_set .wait ()
517
525
518
526
@@ -583,6 +591,7 @@ def add_test_set_config(
583
591
self , name , test_names : List [str ], modes : List [str ] = None ,
584
592
only_if : Dict [str , List [str ]] = None ,
585
593
not_if : Dict [str , List [str ]] = None ,
594
+ simultaneous : int = None ,
586
595
save : bool = True ,
587
596
_depends_on : List [str ] = None , _depends_pass : bool = False ):
588
597
"""Manually add a test set to this series. The set will be added to the
@@ -594,6 +603,7 @@ def add_test_set_config(
594
603
:param modes: A List of modes to add.
595
604
:param only_if: Only if conditions
596
605
:param not_if: Not if conditions
606
+ :param simultaneous: Number of tests within the test set to run simultaneously.
597
607
:param save: Save the series config after adding the test set. Setting this
598
608
to false is useful if you want to add multiple configs before saving.
599
609
:param _depends_on: A list of test names that this test depends on. For
@@ -613,6 +623,7 @@ def add_test_set_config(
613
623
'modes' : modes or [],
614
624
'only_if' : only_if or {},
615
625
'not_if' : not_if or {},
626
+ 'simultaneous' : simultaneous ,
616
627
}
617
628
618
629
if save :
0 commit comments