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] add option to specify result bundle path #20742

Merged
merged 3 commits into from
Nov 16, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scan/lib/scan/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ def self.available_options
env_name: "SCAN_OUTPUT_XCTESTRUN",
description: "Should provide additional copy of .xctestrun file (settings.xctestrun) and place in output path?",
default_value: false),
FastlaneCore::ConfigItem.new(key: :result_bundle_path,
env_name: "SCAN_RESULT_BUNDLE_PATH",
description: "Custom path for the result bundle, overrides result_bundle",
type: String,
optional: true),
FastlaneCore::ConfigItem.new(key: :result_bundle,
short_option: "-z",
env_name: "SCAN_RESULT_BUNDLE",
Expand Down
7 changes: 6 additions & 1 deletion scan/lib/scan/test_command_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ def options # rubocop:disable Metrics/PerceivedComplexity
if config[:use_system_scm] && !options.include?("-scmProvider system")
options << "-scmProvider system"
end
options << "-resultBundlePath '#{result_bundle_path(true)}'" if config[:result_bundle]
if config[:result_bundle_path]
options << "-resultBundlePath '#{config[:result_bundle_path].shellescape}'"
Scan.cache[:result_bundle_path] = config[:result_bundle_path]
elsif config[:result_bundle]
options << "-resultBundlePath '#{result_bundle_path(true)}'"
end
if FastlaneCore::Helper.xcode_at_least?(10)
options << "-parallel-testing-enabled #{config[:parallel_testing] ? 'YES' : 'NO'}" unless config[:parallel_testing].nil?
options << "-parallel-testing-worker-count #{config[:concurrent_workers]}" if config[:concurrent_workers]
Expand Down