-
Notifications
You must be signed in to change notification settings - Fork 107
[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
base: users/paschalis-mpeis/addninjasteps-none-checks
Are you sure you want to change the base?
[BOLT] Set nfc-tests once #466
Conversation
Adding an example to this:
This patch will add them once, under the NFC-mode condition. After #142410 is merged, those tests won't run. |
cdd7fc9
to
cf41ec9
Compare
b03cc23
to
9ffb74e
Compare
There was a problem hiding this 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.
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
9ffb74e
to
154a315
Compare
Thanks Galina for approving #477. I now assume there are no objections on your end on this PR. |
# bolt-info will always mismatch in NFC mode | ||
'--xfail=bolt-info.test', | ||
'tools/bolt/test'], | ||
command=["ninja", "check-bolt"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid running check-bolt after nfc-check-setup will rebuild BOLT and replace the llvm-bolt symlink to llvm-bolt-wrapper. Did you check it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Amir,
Thanks for the review. Yes, all patches have been tested for some time.
Why we need check-bolt
now:
Previously, addNinjaSteps
ran check-bolt
unconditionally, building any required utilities, and running the tests.
Now that we do this step conditionally, so this needs to be in place.
About the llvm-bolt-wrapper symlink:
Indeed, the nfc-check-setup
creates a symlink to llvm-bolt-wrapper
, which is later replaced by the check-bolt
. However, I don't think this affects the BOLT builder now:
- step
nfc-check-setup
:- provides two binaries (old, new)
- does
--switch-back
to the commit we are interested in - creates that symlink
- step
nfc-check-bolt-different
: determines whether to run tests - step
nfc-check-bolt
: conditionally runs as needed, doingcheck-bolt
and overwriting that symlink - step
nfc-check-large-bolt
: similarly with above
So, tests do run on the correct llvm-bolt binary version, which is not a symlink. Does the llvm-bolt-wrapper
serve any purpose, at least for llvm-zorg, other than the nfc-stat-parser.py comparisons, now cleaned up by #465 ?
PS: I'm happy to perform additional cleanup on the llvm-project tools after we merge these changes.
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.Some nits: