fastlane/lib/fastlane/actions/run_tests.rb in fastlane-2.201.0 vs fastlane/lib/fastlane/actions/run_tests.rb in fastlane-2.201.1
- old
+ new
@@ -2,10 +2,11 @@
module Actions
module SharedValues
SCAN_DERIVED_DATA_PATH = :SCAN_DERIVED_DATA_PATH
SCAN_GENERATED_PLIST_FILE = :SCAN_GENERATED_PLIST_FILE
SCAN_GENERATED_PLIST_FILES = :SCAN_GENERATED_PLIST_FILES
+ SCAN_GENERATED_XCRESULT_PATH = :SCAN_GENERATED_XCRESULT_PATH
SCAN_ZIP_BUILD_PRODUCTS_PATH = :SCAN_ZIP_BUILD_PRODUCTS_PATH
end
class RunTestsAction < Action
def self.run(values)
@@ -27,10 +28,16 @@
rescue => ex
if values[:fail_build]
raise ex
end
ensure
+ if Scan.cache && (result_bundle_path = Scan.cache[:result_bundle_path])
+ Actions.lane_context[SharedValues::SCAN_GENERATED_XCRESULT_PATH] = File.absolute_path(result_bundle_path)
+ else
+ Actions.lane_context[SharedValues::SCAN_GENERATED_XCRESULT_PATH] = nil
+ end
+
unless values[:derived_data_path].to_s.empty?
plist_files_before = manager.plist_files_before || []
Actions.lane_context[SharedValues::SCAN_DERIVED_DATA_PATH] = values[:derived_data_path]
plist_files_after = manager.test_summary_filenames(values[:derived_data_path])
@@ -68,9 +75,10 @@
def self.output
[
['SCAN_DERIVED_DATA_PATH', 'The path to the derived data'],
['SCAN_GENERATED_PLIST_FILE', 'The generated plist file'],
['SCAN_GENERATED_PLIST_FILES', 'The generated plist files'],
+ ['SCAN_GENERATED_XCRESULT_PATH', 'The path to the generated .xcresult'],
['SCAN_ZIP_BUILD_PRODUCTS_PATH', 'The path to the zipped build products']
]
end
def self.is_supported?(platform)