Skip to content

Commit cbce985

Browse files
committed
ci: better parallel
Signed-off-by: Henry Schreiner <[email protected]>
1 parent d633518 commit cbce985

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- bash: |
2828
python -m pip install dependency-groups
2929
python -m dependency_groups test | xargs python -m pip install -e.
30-
python ./bin/run_tests.py --num-processes 2
30+
python ./bin/run_tests.py
3131
3232
- job: windows_311
3333
pool: {vmImage: 'windows-2019'}

bin/run_tests.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from pathlib import Path
99

1010
if __name__ == "__main__":
11-
default_cpu_count = os.cpu_count() or 2
11+
if sys.version_info < (3, 13):
12+
default_cpu_count = os.cpu_count() or 2
13+
else:
14+
default_cpu_count = os.process_cpu_count() or 2
15+
1216
parser = argparse.ArgumentParser()
1317
parser.add_argument(
1418
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"
@@ -80,7 +84,7 @@
8084
integration_test_args += ["--run-podman"]
8185

8286
print(
83-
"\n\n========================= NON-SERIAL INTEGRATION TESTS =========================",
87+
f"\n\n========================= NON-SERIAL ({args.num_processes}) INTEGRATION TESTS =========================",
8488
flush=True,
8589
)
8690
subprocess.run(integration_test_args, check=True)

0 commit comments

Comments
 (0)