Skip to content

[BOLT] Set nfc-tests once #466

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

paschalis-mpeis
Copy link
Member

When setting up the nfc-mode tests, avoid adding an extra pair of in-tree and
out-of-tree tests that were unconditional. This was previously done with
addNinjaSteps. Instead, add those later and make them conditional on llvm-bolt
being modified.

Since tests are now only added by BOLTBuilder:

  • ninja runs the in-tree tests to correctly build dependencies.
  • flunkOnFailure is set to update the build status on failures.

Some nits:

  • the '--switch-back' flag is used (from nfc-check-setup.py).
  • a 'nfc-' prefix is appended to 'check-bolt-different' step
  • remove timing.log cleanup

@paschalis-mpeis paschalis-mpeis marked this pull request as ready for review June 10, 2025 15:22
@paschalis-mpeis paschalis-mpeis requested a review from aaupov June 10, 2025 15:22
@paschalis-mpeis
Copy link
Member Author

Adding an example to this:

  • Patch 90beda is an unrelated change.
  • Normally, none of the tests should have run.
  • However, both in-tree and out-of-tree tests run twice (build: 20205):
    • first run unconditionally by steps 8 and 9
    • then they run conditionally at steps 12 and 13.

This patch will add them once, under the NFC-mode condition. After #142410 is merged, those tests won't run.

@paschalis-mpeis paschalis-mpeis requested a review from asb June 10, 2025 15:22
@paschalis-mpeis paschalis-mpeis force-pushed the users/paschalis-mpeis/gnu-buildid-and-cleanup branch from cdd7fc9 to cf41ec9 Compare June 13, 2025 09:39
@paschalis-mpeis paschalis-mpeis force-pushed the users/paschalis-mpeis/set-nfc-tests-once branch from b03cc23 to 9ffb74e Compare June 13, 2025 09:48
Copy link
Contributor

@gkistanova gkistanova left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, Paschalis!

Could you make the change to UnifiedTreeBuilder a separate PR, please?

Or you can pass it an empty list instead of None as that's what UnifiedTreeBuilder expects in this case.

@paschalis-mpeis paschalis-mpeis force-pushed the users/paschalis-mpeis/set-nfc-tests-once branch from 9ffb74e to 154a315 Compare June 18, 2025 09:49
@paschalis-mpeis paschalis-mpeis changed the base branch from users/paschalis-mpeis/gnu-buildid-and-cleanup to users/paschalis-mpeis/addninjasteps-none-checks June 18, 2025 09:50
@paschalis-mpeis
Copy link
Member Author

Hi Galina,

Thank you for your review. I've created the below PR as you suggested:

The current PR (#466) is now based on #477 and includes only BOLTBuilder logic.
Let me know if you have any further comments.


On the BOLTBuilder logic itself, any comments from @aaupov ?

@paschalis-mpeis
Copy link
Member Author

Thanks Galina for approving #477. I now assume there are no objections on your end on this PR.

When setting up the nfc-mode tests, avoid adding an extra pair of in-tree and
out-of-tree tests that were unconditional. This was previously done with
addNinjaSteps. Instead, add those later and make them conditional on llvm-bolt
being modified.

Since tests are now only added by BOLTBuilder:
- `ninja` runs the in-tree tests to correctly build dependencies.
- flunkOnFailure is set to update the build status on failures.

Some nits:
- the '--switch-back' flag is used (from nfc-check-setup.py).
- a 'nfc-' prefix is appended to 'check-bolt-different' step
- remove timing.log cleanup
@paschalis-mpeis paschalis-mpeis force-pushed the users/paschalis-mpeis/set-nfc-tests-once branch from 154a315 to ff25d5c Compare June 23, 2025 08:08
@paschalis-mpeis paschalis-mpeis changed the base branch from users/paschalis-mpeis/addninjasteps-none-checks to main June 23, 2025 08:08
@paschalis-mpeis
Copy link
Member Author

Everything before this is now merged, so I've forced-pushed and rebased to main.

@paschalis-mpeis paschalis-mpeis requested a review from aaupov June 23, 2025 15:54
@paschalis-mpeis paschalis-mpeis merged commit f2ee31f into main Jun 26, 2025
2 checks passed
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.

3 participants