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

xcpretty is ran at the end of scan when output_style is raw (which is meant to disable xcpretty) #16372

Closed
4 tasks done
gobetti opened this issue Apr 24, 2020 · 2 comments · Fixed by #16375
Closed
4 tasks done

Comments

@gobetti
Copy link
Contributor

gobetti commented Apr 24, 2020

New Issue Checklist

Issue Description

If I specify output_style: 'raw' on scan then xcpretty is ripped out from the xcodebuild pipe, as expected (per docs, it disables xcpretty). Because I'm not interested in xcpretty's functionality, I use trainer to generate my junit report. However, when the tests finish, I see this printed:

Generating test results. This may take a while for large projects.

Looking at the code that prints that message, the allegedly expensive operation (per "may take a while") running under the hood is xcpretty, something I've opted out and the reason why this temp_junit_report wasn't found.

Furthermore, the printed test results table says 0 tests due to an xcpretty issue so this final run isn't beneficial anyway.

+--------------------+---+
|      Test Results      |
+--------------------+---+
| Number of tests    | 0 |
| Number of failures | 0 |
+--------------------+---+

Possible solution

For my case specifically, I don't need xcpretty to run at all because trainer will create the junit (faster) and report what I need, so skipping that test_results method when output_style='raw' works for me. Apparently there are people who "disable xcpretty" (output_style=raw) but still want it to run at the end in order to get the test results table as there's a unit test verifying just that. So we can make this a parameter; I actually prefer it to be because it would also allow for clearer documentation.

As of today, gym uses disable_xcpretty for the same purpose that scan uses output_style='raw'. Maybe scan could bring that option in, then force output_style to raw if disable_xcpretty. People who still want xcpretty to run at the end would still use output_style='raw', and people like me who don't, would migrate to disable_xcpretty

Thank you for reading 🙏

@fastlane-bot
Copy link

It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@fastlane-bot
Copy link

The pull request #16375 that closed this issue was merged and released as part of fastlane 2.147.0 🚀
Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!

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

Successfully merging a pull request may close this issue.

3 participants