-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
optimization for XCode 11 conversion script for XCode 11 #121
Conversation
+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 |
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.
@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?
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.
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
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.
@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.
And I hope you meant "minutes instead of hours" :-) |
+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 :-) |
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