Skip to content
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

[scan] fix scan not failing when disable_xcpretty and fail_build are true #17946

Merged
merged 2 commits into from
Jan 15, 2021
Merged

[scan] fix scan not failing when disable_xcpretty and fail_build are true #17946

merged 2 commits into from
Jan 15, 2021

Conversation

jhandguy
Copy link
Contributor

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Resolves #17945.

Description

In handle_results, if disable_xcpretty is true, then throw a test_failure.
If fail_build is false, the manager will catch the exception and make scan succeed.
If fail_build is true, the manager will throw the exception further and make scan fail.

Testing Steps

Tested locally with a failing test:

  • if disable_xcpretty and fail_build are true, scan fails
  • if disable_xcpretty is true and fail_build is false, scan does not fail

@google-cla google-cla bot added the cla: yes label Jan 11, 2021
@joshdholtz joshdholtz changed the title fix: fix scan not failing when disable_xcpretty and fail_build are true [scan] fix scan not failing when disable_xcpretty and fail_build are true Jan 15, 2021
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

This makes sense to me! Thank you so much for this fix ❤️ Really appreciate all your contributions!

@joshdholtz joshdholtz merged commit 15093fc into fastlane:master Jan 15, 2021
@fastlane-bot
Copy link

Hey @jhandguy 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

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

Congratulations! 🎉 This was released as part of fastlane 2.172.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[scan] Scan not failing when disable_xcpretty and fail_build are true
3 participants