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] Keep initial xcresult #18555

Merged
merged 2 commits into from Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions scan/lib/scan/runner.rb
Expand Up @@ -55,6 +55,8 @@ def test_app
end

def execute(retries: 0)
Scan.cache[:retry_attempt] = Scan.config[:number_of_retries] - retries

command = @test_command_generator.generate

prefix_hash = [
Expand Down
4 changes: 3 additions & 1 deletion scan/lib/scan/test_command_generator.rb
Expand Up @@ -164,8 +164,10 @@ def build_path

# The path to the result bundle
def result_bundle_path
retry_count = Scan.cache[:retry_attempt] || 0
attempt = retry_count > 0 ? "-#{retry_count}" : ""
ext = FastlaneCore::Helper.xcode_version.to_i >= 11 ? '.xcresult' : '.test_result'
path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + ext
path = File.join(Scan.config[:output_directory], Scan.config[:scheme]) + attempt + ext
if File.directory?(path)
FileUtils.remove_dir(path)
end
Expand Down