Skip to content

Commit d45603d

Browse files
committed
gh-146197: Run -m test.pythoninfo on the Emscripten CI
1 parent 0c83e8b commit d45603d

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/reusable-emscripten.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,7 @@ jobs:
6868
run: python3 Platforms/emscripten configure-host --host-runner node -- --config-cache
6969
- name: "Make host Python"
7070
run: python3 Platforms/emscripten make-host
71+
- name: "Display build info"
72+
run: python3 Platforms/emscripten run --pythoninfo
7173
- name: "Test"
7274
run: python3 Platforms/emscripten run --test

Platforms/emscripten/__main__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ def run_emscripten_python(context):
591591

592592
if context.test:
593593
args = load_config_toml()["test-args"] + args
594+
elif context.pythoninfo:
595+
args = load_config_toml()["pythoninfo-args"] + args
594596

595597
os.execv(str(exec_script), [str(exec_script), *args])
596598

@@ -726,6 +728,14 @@ def main():
726728
"Default arguments loaded from Platforms/emscripten/config.toml"
727729
),
728730
)
731+
run.add_argument(
732+
"--pythoninfo",
733+
action="store_true",
734+
default=False,
735+
help=(
736+
"If passed, run -m test.pythoninfo"
737+
),
738+
)
729739
run.add_argument(
730740
"args",
731741
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= [
15+
"-m", "test.pythoninfo",
16+
]
1417

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

0 commit comments

Comments
 (0)