Skip to content

Improve rebaseline_tests.py --update-emsdk to enable llvm and binaryen version bumps#27352

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:update-emsdk-improvements
Jul 14, 2026
Merged

Improve rebaseline_tests.py --update-emsdk to enable llvm and binaryen version bumps#27352
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:update-emsdk-improvements

Conversation

@sbc100

@sbc100 sbc100 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

When running tools/maint/rebaseline_tests.py --update-emsdk, check both the LLVM version and Binaryen version in the currently installed SDK (get_clang_version and get_binaryen_version), and automatically patch EXPECTED_LLVM_VERSION in tools/shared.py and EXPECTED_BINARYEN_VERSION in tools/building.py if they differ.

Also update check_binaryen in tools/building.py so it has the same buildbot handling (BUILDBOT_BUILDNUMBER) as check_llvm_version, only allowing EXPECTED_BINARYEN_VERSION + 1 in CI environments.

We should probably split up this script since its doing a lot more than rebaselining tests at this point, but I'll leave that for a followup.

See #27349

@sbc100 sbc100 requested a review from kripken July 14, 2026 23:34
@sbc100 sbc100 changed the title [rebaseline_tests] Improve --update-emsdk and binaryen version check [rebaseline_tests] Improve --update-emsdk to enable llvm and binaryen version bumps Jul 14, 2026
@sbc100 sbc100 changed the title [rebaseline_tests] Improve --update-emsdk to enable llvm and binaryen version bumps Improve rebaseline_tests.py --update-emsdk to enable llvm and binaryen version bumps Jul 14, 2026
utils.write_file(emsdk_version_file, installed_sha + '\n')
if update := update_expected_llvm_version():
tool_updates.append(update)
if update := update_expected_binaryen_version():

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time using the walrus operator!

Comment thread test/test_sanity.py
self.assertNotContained('unexpected binaryen version', output)

make_fake_tool(self.in_dir('fake', 'bin', 'wasm-opt'), str(building.EXPECTED_BINARYEN_VERSION + 1))
if 'BUILDBOT_BUILDNUMBER' in os.environ:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment, this looks quite odd at first glance.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. And the I added on for the existing usage withing this file for the LLVM version

When running `tools/maint/rebaseline_tests.py --update-emsdk`, check
both the LLVM version and Binaryen version in the currently installed
SDK (`get_clang_version` and `get_binaryen_version`), and automatically
patch `EXPECTED_LLVM_VERSION` in `tools/shared.py` and
`EXPECTED_BINARYEN_VERSION` in `tools/building.py` if they differ.

Also update `check_binaryen` in `tools/building.py` so it has the same
buildbot handling (`BUILDBOT_BUILDNUMBER`) as `check_llvm_version`,
only allowing `EXPECTED_BINARYEN_VERSION + 1` in CI environments.

We should probably split up this script since its doing a lot more
than rebaselining tests at this point, but I'll leave that for
a followup.
@sbc100 sbc100 force-pushed the update-emsdk-improvements branch from 1124cac to 1e7c7d8 Compare July 14, 2026 23:40

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

@sbc100 sbc100 merged commit 45be815 into emscripten-core:main Jul 14, 2026
7 of 21 checks passed
@sbc100 sbc100 deleted the update-emsdk-improvements branch July 14, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants