Skip to content

Commit

Permalink
Use multiple cores in serial runs
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zwicker committed Aug 2, 2023
1 parent fd43ec7 commit dcb212b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
run: |
pip install pytest
cd scripts
python run_tests.py --unit
python run_tests.py --unit --num_cores auto
4 changes: 1 addition & 3 deletions scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ def run_unit_tests(

# run tests using multiple cores?
if parallel:
from multiprocessing import cpu_count

args.extend(["-n", str(cpu_count() // 2), "--durations=10"])
args.extend(["-n", str(os.cpu_count()), "--durations=10"])

# run only a subset of the tests?
if pattern is not None:
Expand Down

0 comments on commit dcb212b

Please sign in to comment.