fastlane 2.201.0.rc3 → 2.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +100 -93
  3. data/fastlane/lib/fastlane/version.rb +1 -1
  4. data/fastlane/swift/Deliverfile.swift +1 -1
  5. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  6. data/fastlane/swift/Fastlane.swift +134 -43
  7. data/fastlane/swift/Gymfile.swift +1 -1
  8. data/fastlane/swift/GymfileProtocol.swift +10 -6
  9. data/fastlane/swift/Matchfile.swift +1 -1
  10. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  11. data/fastlane/swift/Precheckfile.swift +1 -1
  12. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  13. data/fastlane/swift/Scanfile.swift +1 -1
  14. data/fastlane/swift/ScanfileProtocol.swift +18 -6
  15. data/fastlane/swift/Screengrabfile.swift +1 -1
  16. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  17. data/fastlane/swift/Snapshotfile.swift +1 -1
  18. data/fastlane/swift/SnapshotfileProtocol.swift +9 -5
  19. data/fastlane/swift/formatting/Brewfile.lock.json +13 -13
  20. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -0
  21. data/gym/lib/gym/options.rb +1 -1
  22. data/scan/lib/scan/options.rb +6 -1
  23. data/scan/lib/scan/runner.rb +9 -3
  24. data/snapshot/lib/snapshot/options.rb +1 -1
  25. data/trainer/lib/trainer/test_parser.rb +28 -4
  26. metadata +21 -28
  27. data/fastlane/lib/fastlane/.version.rb.swp +0 -0
  28. data/scan/lib/scan/.detect_values.rb.swp +0 -0
  29. data/scan/lib/scan/.options.rb.swp +0 -0
  30. data/scan/lib/scan/.runner.rb.swp +0 -0
  31. data/snapshot/lib/snapshot/.collector.rb.swp +0 -0
  32. data/trainer/lib/assets/.junit.xml.erb.swp +0 -0
  33. data/trainer/lib/trainer/.junit_generator.rb.swp +0 -0
  34. data/trainer/lib/trainer/.test_parser.rb.swp +0 -0
@@ -17,4 +17,4 @@ public class Gymfile: GymfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.200.0
20
+ // Generated with fastlane 2.201.0
@@ -104,7 +104,10 @@ public protocol GymfileProtocol: class {
104
104
  /// Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path
105
105
  var suppressXcodeOutput: Bool? { get }
106
106
 
107
- /// Disable xcpretty formatting of build output
107
+ /// xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)
108
+ var xcodebuildFormatter: String { get }
109
+
110
+ /// **DEPRECATED!** Use `xcodebuild_formatter: ''` instead - Disable xcpretty formatting of build output
108
111
  var disableXcpretty: Bool? { get }
109
112
 
110
113
  /// Use the test (RSpec style) format for build output
@@ -122,12 +125,12 @@ public protocol GymfileProtocol: class {
122
125
  /// Have xcpretty create a JSON compilation database at the provided path
123
126
  var xcprettyReportJson: String? { get }
124
127
 
125
- /// Analyze the project build time and store the output in 'culprits.txt' file
126
- var analyzeBuildTime: Bool? { get }
127
-
128
128
  /// Have xcpretty use unicode encoding when reporting builds
129
129
  var xcprettyUtf: Bool? { get }
130
130
 
131
+ /// Analyze the project build time and store the output in 'culprits.txt' file
132
+ var analyzeBuildTime: Bool? { get }
133
+
131
134
  /// Do not try to build a profile mapping from the xcodeproj. Match or a manually provided mapping should be used
132
135
  var skipProfileDetection: Bool { get }
133
136
 
@@ -182,14 +185,15 @@ public extension GymfileProtocol {
182
185
  var xcargs: String? { return nil }
183
186
  var xcconfig: String? { return nil }
184
187
  var suppressXcodeOutput: Bool? { return nil }
188
+ var xcodebuildFormatter: String { return "xcbeautify" }
185
189
  var disableXcpretty: Bool? { return nil }
186
190
  var xcprettyTestFormat: Bool? { return nil }
187
191
  var xcprettyFormatter: String? { return nil }
188
192
  var xcprettyReportJunit: String? { return nil }
189
193
  var xcprettyReportHtml: String? { return nil }
190
194
  var xcprettyReportJson: String? { return nil }
191
- var analyzeBuildTime: Bool? { return nil }
192
195
  var xcprettyUtf: Bool? { return nil }
196
+ var analyzeBuildTime: Bool? { return nil }
193
197
  var skipProfileDetection: Bool { return false }
194
198
  var xcodebuildCommand: String { return "xcodebuild" }
195
199
  var clonedSourcePackagesPath: String? { return nil }
@@ -200,4 +204,4 @@ public extension GymfileProtocol {
200
204
 
201
205
  // Please don't remove the lines below
202
206
  // They are used to detect outdated files
203
- // FastlaneRunnerAPIVersion [0.9.93]
207
+ // FastlaneRunnerAPIVersion [0.9.94]
@@ -17,4 +17,4 @@ public class Matchfile: MatchfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.200.0
20
+ // Generated with fastlane 2.201.0
@@ -192,4 +192,4 @@ public extension MatchfileProtocol {
192
192
 
193
193
  // Please don't remove the lines below
194
194
  // They are used to detect outdated files
195
- // FastlaneRunnerAPIVersion [0.9.87]
195
+ // FastlaneRunnerAPIVersion [0.9.88]
@@ -17,4 +17,4 @@ public class Precheckfile: PrecheckfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.200.0
20
+ // Generated with fastlane 2.201.0
@@ -52,4 +52,4 @@ public extension PrecheckfileProtocol {
52
52
 
53
53
  // Please don't remove the lines below
54
54
  // They are used to detect outdated files
55
- // FastlaneRunnerAPIVersion [0.9.86]
55
+ // FastlaneRunnerAPIVersion [0.9.87]
@@ -17,4 +17,4 @@ public class Scanfile: ScanfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.200.0
20
+ // Generated with fastlane 2.201.0
@@ -80,9 +80,6 @@ public protocol ScanfileProtocol: class {
80
80
  /// Should the HTML report be opened when tests are completed?
81
81
  var openReport: Bool { get }
82
82
 
83
- /// Disable xcpretty formatting of build, similar to `output_style='raw'` but this will also skip the test results table
84
- var disableXcpretty: Bool? { get }
85
-
86
83
  /// The directory in which all reports will be stored
87
84
  var outputDirectory: String { get }
88
85
 
@@ -104,9 +101,21 @@ public protocol ScanfileProtocol: class {
104
101
  /// Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path
105
102
  var suppressXcodeOutput: Bool? { get }
106
103
 
107
- /// A custom xcpretty formatter to use
104
+ /// xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)
105
+ var xcodebuildFormatter: String { get }
106
+
107
+ /// Remove retry attempts from test results table and the JUnit report (if not using xcpretty)
108
+ var outputRemoveRetryAttempts: Bool { get }
109
+
110
+ /// **DEPRECATED!** Use `output_style: 'raw'` instead - Disable xcpretty formatting of build, similar to `output_style='raw'` but this will also skip the test results table
111
+ var disableXcpretty: Bool? { get }
112
+
113
+ /// **DEPRECATED!** Use 'xcpretty_formatter' instead - A custom xcpretty formatter to use
108
114
  var formatter: String? { get }
109
115
 
116
+ /// A custom xcpretty formatter to use
117
+ var xcprettyFormatter: String? { get }
118
+
110
119
  /// Pass in xcpretty additional command line arguments (e.g. '--test --no-color' or '--tap --no-utf')
111
120
  var xcprettyArgs: String? { get }
112
121
 
@@ -246,7 +255,6 @@ public extension ScanfileProtocol {
246
255
  var addressSanitizer: Bool? { return nil }
247
256
  var threadSanitizer: Bool? { return nil }
248
257
  var openReport: Bool { return false }
249
- var disableXcpretty: Bool? { return nil }
250
258
  var outputDirectory: String { return "./test_output" }
251
259
  var outputStyle: String? { return nil }
252
260
  var outputTypes: String { return "html,junit" }
@@ -254,7 +262,11 @@ public extension ScanfileProtocol {
254
262
  var buildlogPath: String { return "~/Library/Logs/scan" }
255
263
  var includeSimulatorLogs: Bool { return false }
256
264
  var suppressXcodeOutput: Bool? { return nil }
265
+ var xcodebuildFormatter: String { return "xcbeautify" }
266
+ var outputRemoveRetryAttempts: Bool { return false }
267
+ var disableXcpretty: Bool? { return nil }
257
268
  var formatter: String? { return nil }
269
+ var xcprettyFormatter: String? { return nil }
258
270
  var xcprettyArgs: String? { return nil }
259
271
  var derivedDataPath: String? { return nil }
260
272
  var shouldZipBuildProducts: Bool { return false }
@@ -296,4 +308,4 @@ public extension ScanfileProtocol {
296
308
 
297
309
  // Please don't remove the lines below
298
310
  // They are used to detect outdated files
299
- // FastlaneRunnerAPIVersion [0.9.98]
311
+ // FastlaneRunnerAPIVersion [0.9.99]
@@ -17,4 +17,4 @@ public class Screengrabfile: ScreengrabfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.200.0
20
+ // Generated with fastlane 2.201.0
@@ -96,4 +96,4 @@ public extension ScreengrabfileProtocol {
96
96
 
97
97
  // Please don't remove the lines below
98
98
  // They are used to detect outdated files
99
- // FastlaneRunnerAPIVersion [0.9.88]
99
+ // FastlaneRunnerAPIVersion [0.9.89]
@@ -17,4 +17,4 @@ public class Snapshotfile: SnapshotfileProtocol {
17
17
  // during the `init` process, and you won't see this message
18
18
  }
19
19
 
20
- // Generated with fastlane 2.200.0
20
+ // Generated with fastlane 2.201.0
@@ -86,9 +86,6 @@ public protocol SnapshotfileProtocol: class {
86
86
  /// The configuration to use when building the app. Defaults to 'Release'
87
87
  var configuration: String? { get }
88
88
 
89
- /// Additional xcpretty arguments
90
- var xcprettyArgs: String? { get }
91
-
92
89
  /// The SDK that should be used for building the application
93
90
  var sdk: String? { get }
94
91
 
@@ -137,6 +134,12 @@ public protocol SnapshotfileProtocol: class {
137
134
  /// Array of strings matching Test Bundle/Test Suite/Test Cases to skip
138
135
  var skipTesting: String? { get }
139
136
 
137
+ /// xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)
138
+ var xcodebuildFormatter: String { get }
139
+
140
+ /// **DEPRECATED!** Use `xcodebuild_formatter: ''` instead - Additional xcpretty arguments
141
+ var xcprettyArgs: String? { get }
142
+
140
143
  /// Disable xcpretty formatting of build
141
144
  var disableXcpretty: Bool? { get }
142
145
 
@@ -176,7 +179,6 @@ public extension SnapshotfileProtocol {
176
179
  var clean: Bool { return false }
177
180
  var testWithoutBuilding: Bool? { return nil }
178
181
  var configuration: String? { return nil }
179
- var xcprettyArgs: String? { return nil }
180
182
  var sdk: String? { return nil }
181
183
  var scheme: String? { return nil }
182
184
  var numberOfRetries: Int { return 1 }
@@ -193,6 +195,8 @@ public extension SnapshotfileProtocol {
193
195
  var testplan: String? { return nil }
194
196
  var onlyTesting: String? { return nil }
195
197
  var skipTesting: String? { return nil }
198
+ var xcodebuildFormatter: String { return "xcbeautify" }
199
+ var xcprettyArgs: String? { return nil }
196
200
  var disableXcpretty: Bool? { return nil }
197
201
  var suppressXcodeOutput: Bool? { return nil }
198
202
  var useSystemScm: Bool { return false }
@@ -200,4 +204,4 @@ public extension SnapshotfileProtocol {
200
204
 
201
205
  // Please don't remove the lines below
202
206
  // They are used to detect outdated files
203
- // FastlaneRunnerAPIVersion [0.9.82]
207
+ // FastlaneRunnerAPIVersion [0.9.83]
@@ -2,35 +2,35 @@
2
2
  "entries": {
3
3
  "brew": {
4
4
  "swiftformat": {
5
- "version": "0.49.1",
5
+ "version": "0.49.2",
6
6
  "bottle": {
7
7
  "rebuild": 0,
8
8
  "root_url": "https://ghcr.io/v2/homebrew/core",
9
9
  "files": {
10
10
  "arm64_monterey": {
11
11
  "cellar": ":any_skip_relocation",
12
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c43caffb4d2cf9546b0a8fa732ffe5d95b1b1fd7ab03f1c5da39c8e7a0e8ecb4",
13
- "sha256": "c43caffb4d2cf9546b0a8fa732ffe5d95b1b1fd7ab03f1c5da39c8e7a0e8ecb4"
12
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:2279db95259ddbc7ad83e47f5bbf8c308db55b74d5464ac79a027bd33138b023",
13
+ "sha256": "2279db95259ddbc7ad83e47f5bbf8c308db55b74d5464ac79a027bd33138b023"
14
14
  },
15
15
  "arm64_big_sur": {
16
16
  "cellar": ":any_skip_relocation",
17
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:ad0ce5fc15fe1d339d366ece18694fdc1d14021684462a126ed20b537a1a9bf5",
18
- "sha256": "ad0ce5fc15fe1d339d366ece18694fdc1d14021684462a126ed20b537a1a9bf5"
17
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:2f6bddbef7d750d6ed546ed5decd4d54d439f16009491bdb4e4999c99d877bcf",
18
+ "sha256": "2f6bddbef7d750d6ed546ed5decd4d54d439f16009491bdb4e4999c99d877bcf"
19
19
  },
20
20
  "monterey": {
21
21
  "cellar": ":any_skip_relocation",
22
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:33652b8015d31dbe45e00bdc598f1b228cb63c7083b90137fdec66318a88010f",
23
- "sha256": "33652b8015d31dbe45e00bdc598f1b228cb63c7083b90137fdec66318a88010f"
22
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:190bf822a188ec8e8be754de2fcd34166ffb07bbd40d67385653d898a251b167",
23
+ "sha256": "190bf822a188ec8e8be754de2fcd34166ffb07bbd40d67385653d898a251b167"
24
24
  },
25
25
  "big_sur": {
26
26
  "cellar": ":any_skip_relocation",
27
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:f0ad88e5594a6a3e5a35834a9a22473a05511375942dbb046d1085cc537d60b8",
28
- "sha256": "f0ad88e5594a6a3e5a35834a9a22473a05511375942dbb046d1085cc537d60b8"
27
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:fe294ff0fa69548876a70ef7aaf30b7221a43adc9f75f7c157c6f881089da6eb",
28
+ "sha256": "fe294ff0fa69548876a70ef7aaf30b7221a43adc9f75f7c157c6f881089da6eb"
29
29
  },
30
30
  "catalina": {
31
31
  "cellar": ":any_skip_relocation",
32
- "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:564f5daf9cd82407843aed590bd4190f3e5aaa73a30b3bc8ae07135f1319ac97",
33
- "sha256": "564f5daf9cd82407843aed590bd4190f3e5aaa73a30b3bc8ae07135f1319ac97"
32
+ "url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:2a174bf9c47a070b1fcaa32c066cd7c82604fc428db952f11c9bf1e4448c567a",
33
+ "sha256": "2a174bf9c47a070b1fcaa32c066cd7c82604fc428db952f11c9bf1e4448c567a"
34
34
  }
35
35
  }
36
36
  }
@@ -56,9 +56,9 @@
56
56
  "macOS": "11.6"
57
57
  },
58
58
  "monterey": {
59
- "HOMEBREW_VERSION": "3.3.10-21-g3ba6afb",
59
+ "HOMEBREW_VERSION": "3.3.11-80-g5ee14b9",
60
60
  "HOMEBREW_PREFIX": "/opt/homebrew",
61
- "Homebrew/homebrew-core": "54f307bcd04cec374c7fd3f22fe7e6b13f1ad783",
61
+ "Homebrew/homebrew-core": "9ca1b8fa2865504f50fcdbe679417daedfa274cc",
62
62
  "CLT": "13.1.0.0.1.1633545042",
63
63
  "Xcode": "13.2.1",
64
64
  "macOS": "12.0.1"
@@ -114,6 +114,13 @@ module Commander
114
114
  action_launch_context = FastlaneCore::ActionLaunchContext.context_for_action_name(@program[:name], fastlane_client_language: fastlane_client_language, args: ARGV)
115
115
  FastlaneCore.session.action_launched(launch_context: action_launch_context)
116
116
 
117
+ # Trainer has been added to fastlane as of 2.201.0
118
+ # We need to make sure that the trainer fastlane plugin is no longer installed
119
+ # to avoid any clashes
120
+ if Gem::Specification.any? { |s| (s.name == 'fastlane-plugin-trainer') && Gem::Requirement.default =~ (s.version) }
121
+ FastlaneCore::UI.user_error!("Migration Needed: As of 2.201.0, trainer is included in fastlane. Please remove the trainer plugin from your Gemfile or Pluginfile (or with 'gem uninstall fastlane-plugin-trainer') - More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/")
122
+ end
123
+
117
124
  return_value = run_active_command
118
125
 
119
126
  action_completed(@program[:name], status: FastlaneCore::ActionCompletionStatus::SUCCESS)
@@ -234,7 +234,7 @@ module Gym
234
234
 
235
235
  FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
236
236
  env_names: ["GYM_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
237
- description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter",
237
+ description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)",
238
238
  type: String,
239
239
  default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
240
240
  default_value_dynamic: true),
@@ -264,10 +264,15 @@ module Scan
264
264
 
265
265
  FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
266
266
  env_names: ["SCAN_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
267
- description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter",
267
+ description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)",
268
268
  type: String,
269
269
  default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
270
270
  default_value_dynamic: true),
271
+ FastlaneCore::ConfigItem.new(key: :output_remove_retry_attempts,
272
+ env_name: "SCAN_OUTPUT_REMOVE_RETRY_ATTEMPS",
273
+ description: "Remove retry attempts from test results table and the JUnit report (if not using xcpretty)",
274
+ type: Boolean,
275
+ default_value: false),
271
276
 
272
277
  # xcpretty
273
278
  FastlaneCore::ConfigItem.new(key: :disable_xcpretty,
@@ -51,13 +51,18 @@ module Scan
51
51
  end
52
52
  end
53
53
 
54
- # Set retries to 0 if Xcode 13 because TestCommandGenerator will set '-retry-tests-on-failure -test-iterations'
55
- retries = Helper.xcode_at_least?(13) ? 0 : Scan.config[:number_of_retries]
54
+ retries = Scan.config[:number_of_retries]
56
55
  execute(retries: retries)
57
56
  end
58
57
 
59
58
  def execute(retries: 0)
60
- Scan.cache[:retry_attempt] = Scan.config[:number_of_retries] - retries
59
+ # Set retries to 0 if Xcode 13 because TestCommandGenerator will set '-retry-tests-on-failure -test-iterations'
60
+ if Helper.xcode_at_least?(13)
61
+ retries = 0
62
+ Scan.cache[:retry_attempt] = 0
63
+ else
64
+ Scan.cache[:retry_attempt] = Scan.config[:number_of_retries] - retries
65
+ end
61
66
 
62
67
  command = @test_command_generator.generate
63
68
 
@@ -185,6 +190,7 @@ module Scan
185
190
 
186
191
  params = {
187
192
  path: result_bundle_path,
193
+ output_remove_retry_attempts: Scan.config[:output_remove_retry_attempts],
188
194
  silent: !FastlaneCore::Globals.verbose?
189
195
  }
190
196
 
@@ -291,7 +291,7 @@ module Snapshot
291
291
 
292
292
  FastlaneCore::ConfigItem.new(key: :xcodebuild_formatter,
293
293
  env_names: ["SNAPSHOT_XCODEBUILD_FORMATTER", "FASTLANE_XCODEBUILD_FORMATTER"],
294
- description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter",
294
+ description: "xcodebuild formatter to use (ex: 'xcbeautify', 'xcbeautify --quieter', 'xcpretty', 'xcpretty -test'). Use empty string (ex: '') to disable any formatter (More information: https://docs.fastlane.tools/best-practices/xcodebuild-formatters/)",
295
295
  type: String,
296
296
  default_value: Fastlane::Helper::XcodebuildFormatterHelper.xcbeautify_installed? ? 'xcbeautify' : 'xcpretty',
297
297
  default_value_dynamic: true),
@@ -100,7 +100,7 @@ module Trainer
100
100
  UI.user_error!("File not found at path '#{path}'") unless File.exist?(path)
101
101
 
102
102
  if File.directory?(path) && path.end_with?(".xcresult")
103
- parse_xcresult(path)
103
+ parse_xcresult(path, output_remove_retry_attempts: config[:output_remove_retry_attempts])
104
104
  else
105
105
  self.file_content = File.read(path)
106
106
  self.raw_json = Plist.parse_xml(self.file_content)
@@ -193,7 +193,7 @@ module Trainer
193
193
  return output
194
194
  end
195
195
 
196
- def parse_xcresult(path)
196
+ def parse_xcresult(path, output_remove_retry_attempts: false)
197
197
  require 'shellwords'
198
198
  path = Shellwords.escape(path)
199
199
 
@@ -218,10 +218,10 @@ module Trainer
218
218
 
219
219
  # Converts the ActionTestPlanRunSummaries to data for junit generator
220
220
  failures = actions_invocation_record.issues.test_failure_summaries || []
221
- summaries_to_data(summaries, failures)
221
+ summaries_to_data(summaries, failures, output_remove_retry_attempts: output_remove_retry_attempts)
222
222
  end
223
223
 
224
- def summaries_to_data(summaries, failures)
224
+ def summaries_to_data(summaries, failures, output_remove_retry_attempts: false)
225
225
  # Gets flat list of all ActionTestableSummary
226
226
  all_summaries = summaries.map(&:summaries).flatten
227
227
  testable_summaries = all_summaries.map(&:testable_summaries).flatten
@@ -281,6 +281,30 @@ module Trainer
281
281
  test_row
282
282
  end
283
283
 
284
+ # Remove retry attempts from the count and test rows
285
+ if output_remove_retry_attempts
286
+ test_rows = test_rows.reject do |test_row|
287
+ remove = false
288
+
289
+ identifier = test_row[:identifier]
290
+ info = tests_by_identifier[identifier]
291
+
292
+ # Remove if this row is a retry and is a failure
293
+ if info[:retry_count] > 0
294
+ remove = !(test_row[:failures] || []).empty?
295
+ end
296
+
297
+ # Remove all failure and retry count if test did eventually pass
298
+ if remove
299
+ info[:failure_count] -= 1
300
+ info[:retry_count] -= 1
301
+ tests_by_identifier[identifier] = info
302
+ end
303
+
304
+ remove
305
+ end
306
+ end
307
+
284
308
  row = {
285
309
  project_path: testable_summary.project_relative_path,
286
310
  target_name: testable_summary.target_name,
metadata CHANGED
@@ -1,38 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.201.0.rc3
4
+ version: 2.201.0
5
5
  platform: ruby
6
6
  authors:
7
- - Jimmy Dee
7
+ - Jan Piotrowski
8
+ - Jorge Revuelta H
9
+ - Łukasz Grabowski
10
+ - Max Ott
11
+ - Joshua Liebowitz
12
+ - Stefan Natchev
13
+ - Andrew McBurney
8
14
  - Jérôme Lacoste
15
+ - Kohki Miki
16
+ - Helmut Januschka
17
+ - Jimmy Dee
18
+ - Olivier Halligon
9
19
  - Danielle Tomlinson
10
20
  - Maksym Grebenets
21
+ - Manish Rathi
11
22
  - Matthew Ellis
12
- - Josh Holtz
23
+ - Daniel Jankowski
13
24
  - Luka Mirosevic
14
- - Felix Krause
15
- - Iulian Onofrei
16
25
  - Satoshi Namai
17
- - Jan Piotrowski
18
- - Joshua Liebowitz
19
- - Manish Rathi
20
- - Helmut Januschka
21
- - Olivier Halligon
22
- - Stefan Natchev
23
- - Max Ott
24
26
  - Roger Oba
25
- - Kohki Miki
26
- - Andrew McBurney
27
- - Jorge Revuelta H
28
- - Daniel Jankowski
29
- - Aaron Brager
27
+ - Felix Krause
30
28
  - Fumiya Nakamura
29
+ - Aaron Brager
30
+ - Iulian Onofrei
31
+ - Josh Holtz
31
32
  - Manu Wallner
32
33
  autorequire:
33
34
  bindir: bin
34
35
  cert_chain: []
35
- date: 2022-01-18 00:00:00.000000000 Z
36
+ date: 2022-01-21 00:00:00.000000000 Z
36
37
  dependencies:
37
38
  - !ruby/object:Gem::Dependency
38
39
  name: xcodeproj
@@ -1013,7 +1014,6 @@ files:
1013
1014
  - fastlane/lib/assets/s3_version_template.erb
1014
1015
  - fastlane/lib/fastlane.rb
1015
1016
  - fastlane/lib/fastlane/.DS_Store
1016
- - fastlane/lib/fastlane/.version.rb.swp
1017
1017
  - fastlane/lib/fastlane/action.rb
1018
1018
  - fastlane/lib/fastlane/action_collector.rb
1019
1019
  - fastlane/lib/fastlane/actions/.DS_Store
@@ -1577,9 +1577,6 @@ files:
1577
1577
  - scan/lib/assets/ScanfileTemplate
1578
1578
  - scan/lib/assets/ScanfileTemplate.swift
1579
1579
  - scan/lib/scan.rb
1580
- - scan/lib/scan/.detect_values.rb.swp
1581
- - scan/lib/scan/.options.rb.swp
1582
- - scan/lib/scan/.runner.rb.swp
1583
1580
  - scan/lib/scan/commands_generator.rb
1584
1581
  - scan/lib/scan/detect_values.rb
1585
1582
  - scan/lib/scan/error_handler.rb
@@ -1623,7 +1620,6 @@ files:
1623
1620
  - snapshot/lib/assets/SnapshotHelper.swift
1624
1621
  - snapshot/lib/assets/SnapshotHelperXcode8.swift
1625
1622
  - snapshot/lib/snapshot.rb
1626
- - snapshot/lib/snapshot/.collector.rb.swp
1627
1623
  - snapshot/lib/snapshot/collector.rb
1628
1624
  - snapshot/lib/snapshot/commands_generator.rb
1629
1625
  - snapshot/lib/snapshot/dependency_checker.rb
@@ -1849,11 +1845,8 @@ files:
1849
1845
  - supply/lib/supply/setup.rb
1850
1846
  - supply/lib/supply/uploader.rb
1851
1847
  - trainer/lib/.DS_Store
1852
- - trainer/lib/assets/.junit.xml.erb.swp
1853
1848
  - trainer/lib/assets/junit.xml.erb
1854
1849
  - trainer/lib/trainer.rb
1855
- - trainer/lib/trainer/.junit_generator.rb.swp
1856
- - trainer/lib/trainer/.test_parser.rb.swp
1857
1850
  - trainer/lib/trainer/commands_generator.rb
1858
1851
  - trainer/lib/trainer/junit_generator.rb
1859
1852
  - trainer/lib/trainer/module.rb
@@ -1898,9 +1891,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1898
1891
  version: '2.5'
1899
1892
  required_rubygems_version: !ruby/object:Gem::Requirement
1900
1893
  requirements:
1901
- - - ">"
1894
+ - - ">="
1902
1895
  - !ruby/object:Gem::Version
1903
- version: 1.3.1
1896
+ version: '0'
1904
1897
  requirements: []
1905
1898
  rubygems_version: 3.2.3
1906
1899
  signing_key:
Binary file
Binary file
Binary file
Binary file
Binary file