lib/scan/test_command_generator.rb in scan-0.6.1 vs lib/scan/test_command_generator.rb in scan-0.7.0
- old
+ new
@@ -31,14 +31,15 @@
options = []
options += project_path_array
options << "-configuration '#{config[:configuration]}'" if config[:configuration]
options << "-sdk '#{config[:sdk]}'" if config[:sdk]
- options << "-destination '#{config[:destination]}'" # generated in `detect_values`
+ options << destination # generated in `detect_values`
options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path]
options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
options << "-enableCodeCoverage YES" if config[:code_coverage]
+ options << "-enableAddressSanitizer YES" if config[:address_sanitizer]
options << "-xcconfig '#{config[:xcconfig]}'" if config[:xcconfig]
options << config[:xcargs] if config[:xcargs]
options
end
@@ -90,9 +91,17 @@
file_name = "#{Scan.project.app_name}-#{Scan.config[:scheme]}.log"
containing = File.expand_path(Scan.config[:buildlog_path])
FileUtils.mkdir_p(containing)
return File.join(containing, file_name)
+ end
+
+ # Generate destination parameters
+ def destination
+ unless Scan.cache[:destination]
+ Scan.cache[:destination] = [*Scan.config[:destination]].map { |dst| "-destination '#{dst}'" }.join(' ')
+ end
+ Scan.cache[:destination]
end
# The path to set the Derived Data to
def build_path
unless Scan.cache[:build_path]