Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Brett Cannon <brett@python.org>
  • Loading branch information
tiran and brettcannon authored Jun 10, 2022
commit 3dba7a61cb160fcb8820e8b42d50163e6ca58f1e
5 changes: 2 additions & 3 deletions Tools/scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def main(regrtest_args):
]

cross_compile = '_PYTHON_HOST_PLATFORM' in os.environ
hostrunner = os.environ.get("_PYTHON_HOSTRUNNER")
if hostrunner is None:
if (hostrunner := os.environ.get("_PYTHON_HOSTRUNNER")) is None:
hostrunner = sysconfig.get_config_var("HOSTRUNNER")
if cross_compile:
# emulate -E, but keep PYTHONPATH + cross compile env vars, so
Expand Down Expand Up @@ -64,7 +63,7 @@ def main(regrtest_args):
args.append('-n') # Silence alerts under Windows
if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
if cross_compile and hostrunner:
# For now use only one core for cross compiled builds.
# For now use only one core for cross-compiled builds;
# hostrunner can be expensive.
args.extend(['-j', '1'])
else:
Expand Down