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

optimization for XCode 11 conversion script for XCode 11 #121

Merged
merged 3 commits into from
Dec 15, 2021

Conversation

sylvain-combe-sonarsource
Copy link
Member

I implemented the tip suggested by @silverhammermba on #68 for conversion speed optimization on XCode 11.
It requires jq: https://stedolan.github.io/jq/ and I tested it successfully Macos Big Sur and XCode SDK 11.3

@mcstoufer
Copy link

+1 on this for merge. Our conversion is taking hours instead of minutes.

echo 'Failed to execute jq (https://stedolan.github.io/jq/)' 1>&2
exit -1
fi
xcrun xcresulttool export --type directory --path "$xccovarchive_file" --id "$reference" --output-path tmp.xccovarchive

Choose a reason for hiding this comment

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

@sylvain-combe-sonarsource , if the $reference here ends up being a list of IDs (from a merged .xcresult bundle of multiple test plans), can we iterate over them and have the same output-path?

Choose a reason for hiding this comment

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

Something like this shows promise:

for test_ref in $reference; do
     xcrun xcresulttool export --type directory --path "$xccovarchive_file" --id "$test_ref" --output-path tmp.xccovarchive
done

Copy link
Member Author

Choose a reason for hiding this comment

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

@mcstoufer
Many thanks for your review and this proposal.
I was not able to test it fully as I don't have a project with multiple test plans or with merged .xcresult bundles.
But I've added your proposed change to the PR, please confirm it works for you and I'll merge it.

@sylvain-combe-sonarsource
Copy link
Member Author

+1 on this for merge. Our conversion is taking hours instead of minutes.

And I hope you meant "minutes instead of hours" :-)

@jarrodrobins
Copy link

+10000000000 on this PR. The existing conversion script is painfully slow.

@sylvain-combe-sonarsource
Copy link
Member Author

sylvain-combe-sonarsource commented Dec 15, 2021

+10000000000 on this PR. The existing conversion script is painfully slow.

With this much weigh on your vote, I have no choice but to merge the PR now :-)

@sylvain-combe-sonarsource sylvain-combe-sonarsource merged commit 1ed66a3 into master Dec 15, 2021
@sylvain-combe-sonarsource sylvain-combe-sonarsource deleted the add-xcode11-coverage-optimization branch December 15, 2021 08:54
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