gh-109566: Fix regrtest Python options for WASM/WASI (#109954)

WASM and WASI buildbots use multiple PYTHON environment variables
such as PYTHONPATH and _PYTHON_HOSTRUNNER. Don't use -E if the
--python=COMMAND option is used.
This commit is contained in:
Victor Stinner 2023-09-27 12:01:16 +02:00 committed by GitHub
parent b1aebf1e65
commit 91fb8daa24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 8 deletions

View file

@ -504,9 +504,12 @@ class Regrtest:
if sys.flags.bytes_warning < 2:
python_opts.append('-bb')
# Ignore PYTHON* environment variables
if not sys.flags.ignore_environment:
python_opts.append('-E')
# WASM/WASI buildbot builders pass multiple PYTHON environment
# variables such as PYTHONPATH and _PYTHON_HOSTRUNNER.
if not self.python_cmd:
# Ignore PYTHON* environment variables
if not sys.flags.ignore_environment:
python_opts.append('-E')
if not python_opts:
return