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

Fix buffering issues with xcpretty. #123

Merged
merged 2 commits into from
Apr 23, 2015

Conversation

mtauraso
Copy link
Contributor

This makes the output update more smoothly :)

STDOUT.print(formatted_text + formatter.optional_newline) unless formatted_text.empty?
unless formatted_text.empty?
STDOUT.print(formatted_text + formatter.optional_newline)
STDOUT.flush()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not use parentheses for method calls with no arguments.

@supermarin
Copy link
Contributor

@mtauraso thanks for the contribution!

Do you mind posting a screenshot before/after, just documentation-wise?

@supermarin
Copy link
Contributor

@mtauraso /ping

I've tried to run with or without .flush and can't see any difference.
Could you please post a screenshot?

@xfreebird
Copy link

We always have this buffering issues when run from Jenkins with tee. It would take about 30 seconds to get some output.

You can test that by running a job from Jenkins connected through ssh to a remote Slave by running the command below:
xcodebuild -workspace 'ClientApp.xcworkspace' -scheme 'ClientApp' -configuration 'Release' -sdk 'iphoneos' build | tee 'artifacts/xcodebuild.log' | xcpretty

I tried this patch, and it helps. Now all looks like in real time.
Thanks @mtauraso !

@supermarin please merge this as it would fix this buffering issues.

@supermarin
Copy link
Contributor

@xfreebird oh i see, it totally makes sense. thanks!

supermarin added a commit that referenced this pull request Apr 23, 2015
Fix buffering issues with xcpretty.
@supermarin supermarin merged commit 743d152 into xcpretty:master Apr 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants