Improve rebaseline_tests.py --update-emsdk to enable llvm and binaryen version bumps#27352
Merged
Merged
Conversation
--update-emsdk and binaryen version check--update-emsdk to enable llvm and binaryen version bumps
--update-emsdk to enable llvm and binaryen version bumpsrebaseline_tests.py --update-emsdk to enable llvm and binaryen version bumps
sbc100
commented
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(): |
Collaborator
Author
There was a problem hiding this comment.
First time using the walrus operator!
kripken
reviewed
Jul 14, 2026
| 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: |
Member
There was a problem hiding this comment.
Please add a comment, this looks quite odd at first glance.
Collaborator
Author
There was a problem hiding this comment.
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.
1124cac to
1e7c7d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running
tools/maint/rebaseline_tests.py --update-emsdk, check both the LLVM version and Binaryen version in the currently installed SDK (get_clang_versionandget_binaryen_version), and automatically patchEXPECTED_LLVM_VERSIONintools/shared.pyandEXPECTED_BINARYEN_VERSIONintools/building.pyif they differ.Also update
check_binaryenintools/building.pyso it has the same buildbot handling (BUILDBOT_BUILDNUMBER) ascheck_llvm_version, only allowingEXPECTED_BINARYEN_VERSION + 1in 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