Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-145177: Add emscripten run --test, uses test args from config.toml#146160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
freakboy3742 merged 2 commits intopython:mainfromhoodmane:emscripten-run-test
Mar 19, 2026
Merged
Show file tree
Hide file tree
Changes fromall commits
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
15 changes: 14 additions & 1 deletionPlatforms/emscripten/__main__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -578,7 +578,10 @@ def run_emscripten_python(context):
if args and args[0] == "--":
args = args[1:]

os.execv(str(exec_script), [str(exec_script)] + args)
if context.test:
args = load_config_toml()["test-args"] + args

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


def build_target(context):
Expand DownExpand Up@@ -695,6 +698,15 @@ def main():
"run",
help="Run the built emscripten Python",
)
run.add_argument(
"--test",
action="store_true",
default=False,
help=(
"If passed, will add the default test arguments to the beginning of the command. "
"Default arguments loaded from Platforms/emscripten/config.toml"
)
)
run.add_argument(
"args",
nargs=argparse.REMAINDER,
Expand All@@ -704,6 +716,7 @@ def main():
)
)
add_cross_build_dir_option(run)

clean = subcommands.add_parser(
"clean", help="Delete files and directories created by this script"
)
Expand Down
8 changes: 8 additions & 0 deletionsPlatforms/emscripten/config.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,14 @@
# Python versions.
emscripten-version = "4.0.12"
node-version = "24"
test-args = [
"-m", "test",
"-v",
"-uall",
"--rerun",
"--single-process",
"-W",
]

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

[8]ページ先頭

©2009-2026 Movatter.jp