Skip to content

Commit c6dd764

Browse files
vstinnerhugovk
andauthored
[3.14] gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332) (#146336)
gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332) (cherry picked from commit a57209e) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent f883bbd commit c6dd764

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Platforms/emscripten/__main__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ def run_emscripten_python(context):
580580

581581
if context.test:
582582
args = load_config_toml()["test-args"] + args
583+
elif context.pythoninfo:
584+
args = load_config_toml()["pythoninfo-args"] + args
583585

584586
os.execv(str(exec_script), [str(exec_script), *args])
585587

@@ -703,10 +705,16 @@ def main():
703705
action="store_true",
704706
default=False,
705707
help=(
706-
"If passed, will add the default test arguments to the beginning of the command. "
708+
"Add the default test arguments to the beginning of the command. "
707709
"Default arguments loaded from Platforms/emscripten/config.toml"
708710
)
709711
)
712+
run.add_argument(
713+
"--pythoninfo",
714+
action="store_true",
715+
default=False,
716+
help="Run -m test.pythoninfo",
717+
)
710718
run.add_argument(
711719
"args",
712720
nargs=argparse.REMAINDER,

Platforms/emscripten/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ test-args = [
1111
"--single-process",
1212
"-W",
1313
]
14+
pythoninfo-args = [
15+
"-m", "test.pythoninfo",
16+
]
1417

1518
[libffi]
1619
url = "https://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gz"

0 commit comments

Comments
 (0)