]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332)
authorVictor Stinner <vstinner@python.org>
Mon, 23 Mar 2026 17:23:25 +0000 (18:23 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Mar 2026 17:23:25 +0000 (17:23 +0000)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
.github/workflows/reusable-emscripten.yml
Platforms/emscripten/__main__.py
Platforms/emscripten/config.toml

index 549ff671a68e9c9bd841fa1986481b54e0a29c1f..fd269df9eada24eb72fe98c075be1eff8304edbe 100644 (file)
@@ -68,5 +68,7 @@ jobs:
       run: python3 Platforms/emscripten configure-host --host-runner node -- --config-cache
     - name: "Make host Python"
       run: python3 Platforms/emscripten make-host
+    - name: "Display build info"
+      run: python3 Platforms/emscripten run --pythoninfo
     - name: "Test"
       run: python3 Platforms/emscripten run --test
index 3db998a048e7e26308bf055a551bf8beb6d2f950..1958de7986c46b7da4bff841a90b862a69e86b43 100644 (file)
@@ -591,6 +591,8 @@ def run_emscripten_python(context):
 
     if context.test:
         args = load_config_toml()["test-args"] + args
+    elif context.pythoninfo:
+        args = load_config_toml()["pythoninfo-args"] + args
 
     os.execv(str(exec_script), [str(exec_script), *args])
 
@@ -722,10 +724,16 @@ def main():
         action="store_true",
         default=False,
         help=(
-            "If passed, will add the default test arguments to the beginning of the command. "
+            "Add the default test arguments to the beginning of the command. "
             "Default arguments loaded from Platforms/emscripten/config.toml"
         ),
     )
+    run.add_argument(
+        "--pythoninfo",
+        action="store_true",
+        default=False,
+        help="Run -m test.pythoninfo",
+    )
     run.add_argument(
         "args",
         nargs=argparse.REMAINDER,
index 99a7b73884559d87f8232aef9b36c053e58645c6..ba2dc8f4a482bfa9a58784ca9608eee8fa86b4cd 100644 (file)
@@ -11,6 +11,9 @@ test-args = [
     "--single-process",
     "-W",
 ]
+pythoninfo-args = [
+    "-m", "test.pythoninfo",
+]
 
 [dependencies.libffi]
 url = "https://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gz"