From 60ab04645ac16e1656c91ca3cd3d8e4d4485400a Mon Sep 17 00:00:00 2001 From: Ayush Agrawal Date: Thu, 23 Oct 2025 14:58:34 -0700 Subject: [PATCH] chore: parallelize presubmit unit test runs with pytest-xdist PiperOrigin-RevId: 823199807 --- .kokoro/presubmit/unit_3-10.cfg | 2 +- .kokoro/presubmit/unit_3-11.cfg | 2 +- .kokoro/presubmit/unit_3-12.cfg | 2 +- .kokoro/presubmit/unit_3-9.cfg | 2 +- noxfile.py | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.kokoro/presubmit/unit_3-10.cfg b/.kokoro/presubmit/unit_3-10.cfg index e7440fefd3..ec61c5c27d 100644 --- a/.kokoro/presubmit/unit_3-10.cfg +++ b/.kokoro/presubmit/unit_3-10.cfg @@ -9,5 +9,5 @@ env_vars: { # Run unit tests in parallel, splitting up by file env_vars: { key: "PYTEST_ADDOPTS" - value: "-n=auto --dist=loadscope" + value: "-n=8 --dist=loadscope" } diff --git a/.kokoro/presubmit/unit_3-11.cfg b/.kokoro/presubmit/unit_3-11.cfg index f22d448fb2..cd3e82b162 100644 --- a/.kokoro/presubmit/unit_3-11.cfg +++ b/.kokoro/presubmit/unit_3-11.cfg @@ -9,5 +9,5 @@ env_vars: { # Run unit tests in parallel, splitting up by file env_vars: { key: "PYTEST_ADDOPTS" - value: "-n=auto --dist=loadscope" + value: "-n=8 --dist=loadscope" } diff --git a/.kokoro/presubmit/unit_3-12.cfg b/.kokoro/presubmit/unit_3-12.cfg index bfab6671ca..9ed60c9f86 100644 --- a/.kokoro/presubmit/unit_3-12.cfg +++ b/.kokoro/presubmit/unit_3-12.cfg @@ -9,5 +9,5 @@ env_vars: { # Run unit tests in parallel, splitting up by file env_vars: { key: "PYTEST_ADDOPTS" - value: "-n=auto --dist=loadscope" + value: "-n=8 --dist=loadscope" } diff --git a/.kokoro/presubmit/unit_3-9.cfg b/.kokoro/presubmit/unit_3-9.cfg index e97dc78539..77349699cc 100644 --- a/.kokoro/presubmit/unit_3-9.cfg +++ b/.kokoro/presubmit/unit_3-9.cfg @@ -9,5 +9,5 @@ env_vars: { # Run unit tests in parallel, splitting up by file env_vars: { key: "PYTEST_ADDOPTS" - value: "-n=auto --dist=loadscope" + value: "-n=8 --dist=loadscope" } diff --git a/noxfile.py b/noxfile.py index 3462705e70..ef44637b80 100644 --- a/noxfile.py +++ b/noxfile.py @@ -204,7 +204,6 @@ def default(session): # Run py.test against the unit tests. session.run( "py.test", - "--quiet", f"--junitxml=unit_{session.python}_sponge_log.xml", "--cov=google", "--cov-append",