-
Notifications
You must be signed in to change notification settings - Fork 441
Improvements to build-script.py #521
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
Conversation
@swift-ci Please test |
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.
Single question about a file.
Otherwise does it look good 🙌
No functionality change
This guarantees that we fail execution of build-script.py if a subcommand fails.
e52e96f
to
de3c8f8
Compare
This reduces the time to gyb-generate sources from ~12s to ~4s.
de3c8f8
to
2d197b2
Compare
I also added a new improvement now to run gyb-generation on multiple threads, speeding it up by 3x from ~12s to ~4s: de3c8f8 |
@swift-ci Please test |
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.
Just a small nit-pick 🙌
else: | ||
lit_success = run_lit_tests( | ||
if not skip_lit_tests: | ||
run_lit_tests( |
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 know this is the current behavior but why we don't run xctest cases when lit-tests fails? I feel we should run them both unconditionally, and raise a failure when either of them fails.
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 think there are three reasons:
- I like the way build-script fails early. That way the log output of lit-based tests are closer to the bottom (and thus easier to read) than when we continue to execute xctest commands
- It follows the current paradigm of the build-script that if one command fails it shouldn’t execute any other commands
- It’s slightly easier to implement this way
If you have strong opinions on this, we can change it but I like it the way it is.
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 see. I agree that it's nice we can see the failures closer to the bottom. I still think it's also nice too all failures for both test suites, but it's not a strong opinion, and I can skip lit tests if I want. So let's keep it as it is.
@swift-ci Please test |
check_call
for subprocesses to make sure build-script.py fails with a non-zero exit code if any subprocess fails.