@@ -270,6 +270,13 @@ def _create_test_sets(self, iteration=0):
270270 # create all TestSet objects
271271 universal_modes = self .config ['modes' ]
272272 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+
273280 set_obj = TestSet (
274281 pav_cfg = self .pav_cfg ,
275282 name = set_name ,
@@ -283,7 +290,7 @@ def _create_test_sets(self, iteration=0):
283290 parents_must_pass = set_info ['depends_pass' ],
284291 overrides = self .config .get ('overrides' , []),
285292 status = self .status ,
286- simultaneous = self . simultaneous ,
293+ simultaneous = _simultaneous ,
287294 outfile = self .outfile ,
288295 verbosity = self .verbosity ,
289296 ignore_errors = self .ignore_errors ,
@@ -510,9 +517,10 @@ def _run_set(self, test_set: TestSet, build_only: bool, rebuild: bool, local_bui
510517 "in series {}."
511518 .format (ktests , len (started_tests ),
512519 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
514522 # 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 :
516524 tests_running -= test_set .wait ()
517525
518526
@@ -583,6 +591,7 @@ def add_test_set_config(
583591 self , name , test_names : List [str ], modes : List [str ] = None ,
584592 only_if : Dict [str , List [str ]] = None ,
585593 not_if : Dict [str , List [str ]] = None ,
594+ simultaneous : int = None ,
586595 save : bool = True ,
587596 _depends_on : List [str ] = None , _depends_pass : bool = False ):
588597 """Manually add a test set to this series. The set will be added to the
@@ -594,6 +603,7 @@ def add_test_set_config(
594603 :param modes: A List of modes to add.
595604 :param only_if: Only if conditions
596605 :param not_if: Not if conditions
606+ :param simultaneous: Number of tests within the test set to run simultaneously.
597607 :param save: Save the series config after adding the test set. Setting this
598608 to false is useful if you want to add multiple configs before saving.
599609 :param _depends_on: A list of test names that this test depends on. For
@@ -613,6 +623,7 @@ def add_test_set_config(
613623 'modes' : modes or [],
614624 'only_if' : only_if or {},
615625 'not_if' : not_if or {},
626+ 'simultaneous' : simultaneous ,
616627 }
617628
618629 if save :
0 commit comments