-
Notifications
You must be signed in to change notification settings - Fork 38.6k
test: Reliably don't start itself (lint-all.py runs all tests twice) #25288
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
test: Reliably don't start itself (lint-all.py runs all tests twice) #25288
Conversation
|
Concept ACK. Good catch! |
|
It doesn't run twice in CI, right? For example, looking at https://cirrus-ci.com/task/4523243527733248?logs=lint#L849 I can only find the error once. |
|
Ah, in |
|
May I propose a different solution: to rename the launcher so that it doesn't match the glob. This is 100% reliable and imo more elegant. |
|
Yeah, could rename to |
That way it is impossible for the script to call itself.
Removed th check against __file__ which is not necessary any more after the rename to all-lint.py. Changed glob to find only `lint-*.py` scripts.
2f1f9e3 to
f26a496
Compare
|
Code review ACK f26a496 |
jonatack
left a comment
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.
Post-merge ACK
…uns all tests twice) f26a496 test: clean up all-lint.py (Martin Leitner-Ankerl) 64d72c4 test: rename lint-all.py to all-lint.py (Martin Leitner-Ankerl) Pull request description: When running `./test/lint/lint-all.py`, the script runs all tests but also calls itself because the comparison with `__file__` doesn't work. Comparing resolved paths gives reliable comparison, and lint-all.py doesn't call itself any more ACKs for top commit: laanwj: Code review ACK f26a496 Tree-SHA512: b44abdd685f7b48a6a9f48e96d97138b635c31c1c7ab543cb5636b5f49690ccd56fa6fec01ae7fcc16af01a613372ee77632f70c32059919b373aa8051953791
When running
./test/lint/lint-all.py, the script runs all tests butalso calls itself because the comparison with
__file__doesn't work.Comparing resolved paths gives reliable comparison, and lint-all.py doesn't call itself any more