Skip to content

Commit

Permalink
Merge branch 'mr/pmderodat/zerojobs' into 'master'
Browse files Browse the repository at this point in the history
Merge of #126

See merge request it/e3-testsuite!30
  • Loading branch information
pmderodat committed Jun 26, 2024
2 parents 5aca052 + 665b8e1 commit 9f7dbd9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/e3/testsuite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TestAbort(Exception):
class TestsuiteCore:
"""Testsuite Core driver.
This class is the base of Testsuite class and should not be instanciated.
This class is the base of Testsuite class and should not be instantiated.
It's not recommended to override any of the functions declared in it.
See documentation of Testsuite class for overridable methods and
Expand Down Expand Up @@ -1071,9 +1071,14 @@ def collect_result(job: Job) -> bool:
return False

# Create a scheduler to run all fragments for the testsuite main loop

jobs = self.main.args.jobs
if self.main.args.jobs <= 0:
jobs = os.cpu_count() or 1

scheduler = Scheduler(
job_provider=job_factory,
tokens=self.main.args.jobs,
tokens=jobs,
collect=collect_result,
)

Expand Down

0 comments on commit 9f7dbd9

Please sign in to comment.