Skip to content

Add a GitHub actions check test262.properties#2052

Merged
gbrail merged 8 commits into
mozilla:masterfrom
gbrail:greg-check-262
Aug 31, 2025
Merged

Add a GitHub actions check test262.properties#2052
gbrail merged 8 commits into
mozilla:masterfrom
gbrail:greg-check-262

Conversation

@gbrail

@gbrail gbrail commented Aug 30, 2025

Copy link
Copy Markdown
Collaborator

Check if the test262.properties file was updated correctly using the
built-in tools, as opposed to being edited manually.

Also create the "tools" directory, where I suspect other handy scripts
can be kept.

gbrail added 5 commits August 30, 2025 11:14
Check if the test262.properties file was updated correctly using the
built-in tools, as opposed to being edited manually.

Also create the "tools" directory, where I suspect other handy scripts
can be kept.

@rPraml rPraml left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great!

Have you considered whether it makes sense for the Github action to commit the file?

https://github.com/stefanzweifel/git-auto-commit-action

Comment thread .github/workflows/check262.yml Outdated
- name: Check out test262
# We don't actually want all the history for this part
run: git submodule update --init --single-branch
- name: Set up Java

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you do not rely on java 11, you can skip this step. Ubuntu-latest has already java 21 on board

@gbrail

gbrail commented Aug 30, 2025

Copy link
Copy Markdown
Collaborator Author

OK -- I'm going to have to muck about a bit more just to make it work (and probably not more today). My plan is to add a few dummy commits to see if it really works, and if it does move this logic into the main GitHub action, because it doesn't make a lot of sense for this test to run if the main tests are failing. (Unless we can get Actions to execute the tests in some sort of dependency order, which I don't recall if we can do.)

I'm not sure how I feel about auto-commit -- would it mess up everyone's GH workloads? If not then we can check it out.

@gbrail

gbrail commented Aug 31, 2025

Copy link
Copy Markdown
Collaborator Author

After mucking around for a bit I am just adding a new step to the main CI job which runs test262.properties and checks to see if it needs a re-run. That will catch situations like forgetting to edit the properties file when fixing tests, or manual edits. If it works well we can look at an auto-commit check.

@gbrail
gbrail marked this pull request as ready for review August 31, 2025 04:04
run: echo "hash=${{ hashFiles('./tests/testsrc/test262.properties') }}" >> $GITHUB_OUTPUT
- name: Compare test262 results
run: |
if [ "${{ steps.hashBefore.outputs.hash }}" != "${{ steps.hashAfter.outputs.hash }}" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You might check for modification with git diff / git status here.

How long does this step take?
As long as I understand, this step executes ALL 262 tests... And the java 11 test run executes then again (but only the not excluded ones) - so it should be possible to exclude them (or regenerate the props file in the java 11 test run)

I'm fine with your changes and the above are suggestions, that can (or not) be done in further PRs 👍

@gbrail

gbrail commented Aug 31, 2025

Copy link
Copy Markdown
Collaborator Author

Thanks -- I get it -- I'd like to take a conservative approach and re-check the test properties only after we know that there are no big test failures. It might be time to see if we can come up with some sort of a pipeline of jobs, though, so we can look at that next!

@gbrail
gbrail merged commit 19b98a4 into mozilla:master Aug 31, 2025
3 checks passed
@gbrail
gbrail deleted the greg-check-262 branch August 31, 2025 17:11
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