fastlane 2.201.0.rc1 → 2.201.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +88 -81
- data/fastlane/lib/fastlane/actions/.run_tests.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/run_tests.rb +8 -0
- data/fastlane/lib/fastlane/actions/xcov.rb +5 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +142 -43
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +10 -6
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +18 -6
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +9 -5
- data/fastlane/swift/formatting/Brewfile.lock.json +14 -14
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -0
- data/gym/lib/gym/options.rb +1 -1
- data/scan/lib/scan/.error_handler.rb.swp +0 -0
- data/scan/lib/scan/.runner.rb.swp +0 -0
- data/scan/lib/scan/error_handler.rb +9 -0
- data/scan/lib/scan/options.rb +6 -1
- data/scan/lib/scan/runner.rb +70 -6
- data/scan/lib/scan/test_command_generator.rb +3 -2
- data/snapshot/lib/snapshot/options.rb +1 -1
- data/trainer/lib/assets/junit.xml.erb +3 -3
- data/trainer/lib/trainer/.options.rb.swp +0 -0
- data/trainer/lib/trainer/options.rb +11 -0
- data/trainer/lib/trainer/test_parser.rb +62 -21
- metadata +27 -22
@@ -50,29 +50,40 @@ module Trainer
|
|
50
50
|
|
51
51
|
return_hash = {}
|
52
52
|
files.each do |path|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
53
|
+
extension = config[:extension]
|
54
|
+
output_filename = config[:output_filename]
|
55
|
+
|
56
|
+
should_write_file = !extension.nil? || !output_filename.nil?
|
57
|
+
|
58
|
+
if should_write_file
|
59
|
+
if config[:output_directory]
|
60
|
+
FileUtils.mkdir_p(config[:output_directory])
|
61
|
+
# Remove .xcresult or .plist extension
|
62
|
+
# Use custom file name ONLY if one file otherwise issues
|
63
|
+
if files.size == 1 && output_filename
|
64
|
+
filename = output_filename
|
65
|
+
elsif path.end_with?(".xcresult")
|
66
|
+
filename ||= File.basename(path).gsub(".xcresult", extension)
|
67
|
+
else
|
68
|
+
filename ||= File.basename(path).gsub(".plist", extension)
|
69
|
+
end
|
70
|
+
to_path = File.join(config[:output_directory], filename)
|
66
71
|
else
|
67
|
-
|
72
|
+
# Remove .xcresult or .plist extension
|
73
|
+
if path.end_with?(".xcresult")
|
74
|
+
to_path = path.gsub(".xcresult", extension)
|
75
|
+
else
|
76
|
+
to_path = path.gsub(".plist", extension)
|
77
|
+
end
|
68
78
|
end
|
69
79
|
end
|
70
80
|
|
71
81
|
tp = Trainer::TestParser.new(path, config)
|
72
|
-
File.write(to_path, tp.to_junit)
|
73
|
-
UI.success("Successfully generated '#{to_path}'")
|
82
|
+
File.write(to_path, tp.to_junit) if should_write_file
|
83
|
+
UI.success("Successfully generated '#{to_path}'") if should_write_file && !config[:silent]
|
74
84
|
|
75
|
-
return_hash[
|
85
|
+
return_hash[path] = {
|
86
|
+
to_path: to_path,
|
76
87
|
successful: tp.tests_successful?,
|
77
88
|
number_of_tests: tp.number_of_tests,
|
78
89
|
number_of_failures: tp.number_of_failures,
|
@@ -89,7 +100,7 @@ module Trainer
|
|
89
100
|
UI.user_error!("File not found at path '#{path}'") unless File.exist?(path)
|
90
101
|
|
91
102
|
if File.directory?(path) && path.end_with?(".xcresult")
|
92
|
-
parse_xcresult(path)
|
103
|
+
parse_xcresult(path, output_remove_retry_attempts: config[:output_remove_retry_attempts])
|
93
104
|
else
|
94
105
|
self.file_content = File.read(path)
|
95
106
|
self.raw_json = Plist.parse_xml(self.file_content)
|
@@ -182,7 +193,7 @@ module Trainer
|
|
182
193
|
return output
|
183
194
|
end
|
184
195
|
|
185
|
-
def parse_xcresult(path)
|
196
|
+
def parse_xcresult(path, output_remove_retry_attempts: false)
|
186
197
|
require 'shellwords'
|
187
198
|
path = Shellwords.escape(path)
|
188
199
|
|
@@ -207,10 +218,10 @@ module Trainer
|
|
207
218
|
|
208
219
|
# Converts the ActionTestPlanRunSummaries to data for junit generator
|
209
220
|
failures = actions_invocation_record.issues.test_failure_summaries || []
|
210
|
-
summaries_to_data(summaries, failures)
|
221
|
+
summaries_to_data(summaries, failures, output_remove_retry_attempts: output_remove_retry_attempts)
|
211
222
|
end
|
212
223
|
|
213
|
-
def summaries_to_data(summaries, failures)
|
224
|
+
def summaries_to_data(summaries, failures, output_remove_retry_attempts: false)
|
214
225
|
# Gets flat list of all ActionTestableSummary
|
215
226
|
all_summaries = summaries.map(&:summaries).flatten
|
216
227
|
testable_summaries = all_summaries.map(&:testable_summaries).flatten
|
@@ -270,6 +281,30 @@ module Trainer
|
|
270
281
|
test_row
|
271
282
|
end
|
272
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
|
+
|
273
308
|
row = {
|
274
309
|
project_path: testable_summary.project_relative_path,
|
275
310
|
target_name: testable_summary.target_name,
|
@@ -328,6 +363,12 @@ module Trainer
|
|
328
363
|
}
|
329
364
|
summary_row[:number_of_tests] = summary_row[:tests].count
|
330
365
|
summary_row[:number_of_failures] = summary_row[:tests].find_all { |a| (a[:failures] || []).count > 0 }.count
|
366
|
+
|
367
|
+
# Makes sure that plist support matches data output of xcresult
|
368
|
+
summary_row[:number_of_tests_excluding_retries] = summary_row[:number_of_tests]
|
369
|
+
summary_row[:number_of_failures_excluding_retries] = summary_row[:number_of_failures]
|
370
|
+
summary_row[:number_of_retries] = 0
|
371
|
+
|
331
372
|
summary_row
|
332
373
|
end
|
333
374
|
end
|
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.
|
4
|
+
version: 2.201.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Jorge Revuelta H
|
8
8
|
- Jérôme Lacoste
|
9
|
-
-
|
10
|
-
-
|
11
|
-
-
|
9
|
+
- Andrew McBurney
|
10
|
+
- Daniel Jankowski
|
11
|
+
- Satoshi Namai
|
12
|
+
- Helmut Januschka
|
12
13
|
- Josh Holtz
|
13
|
-
- Luka Mirosevic
|
14
|
-
- Felix Krause
|
15
14
|
- Iulian Onofrei
|
16
|
-
-
|
17
|
-
-
|
18
|
-
-
|
15
|
+
- Roger Oba
|
16
|
+
- Jimmy Dee
|
17
|
+
- Łukasz Grabowski
|
18
|
+
- Manu Wallner
|
19
|
+
- Matthew Ellis
|
19
20
|
- Manish Rathi
|
20
|
-
-
|
21
|
+
- Jan Piotrowski
|
22
|
+
- Fumiya Nakamura
|
23
|
+
- Luka Mirosevic
|
21
24
|
- Olivier Halligon
|
25
|
+
- Joshua Liebowitz
|
26
|
+
- Felix Krause
|
27
|
+
- Aaron Brager
|
28
|
+
- Kohki Miki
|
22
29
|
- Stefan Natchev
|
23
30
|
- Max Ott
|
24
|
-
-
|
25
|
-
-
|
26
|
-
- Andrew McBurney
|
27
|
-
- Jorge Revuelta H
|
28
|
-
- Daniel Jankowski
|
29
|
-
- Aaron Brager
|
30
|
-
- Fumiya Nakamura
|
31
|
-
- Manu Wallner
|
31
|
+
- Danielle Tomlinson
|
32
|
+
- Maksym Grebenets
|
32
33
|
autorequire:
|
33
34
|
bindir: bin
|
34
35
|
cert_chain: []
|
35
|
-
date: 2022-01-
|
36
|
+
date: 2022-01-23 00:00:00.000000000 Z
|
36
37
|
dependencies:
|
37
38
|
- !ruby/object:Gem::Dependency
|
38
39
|
name: xcodeproj
|
@@ -1016,6 +1017,7 @@ files:
|
|
1016
1017
|
- fastlane/lib/fastlane/action.rb
|
1017
1018
|
- fastlane/lib/fastlane/action_collector.rb
|
1018
1019
|
- fastlane/lib/fastlane/actions/.DS_Store
|
1020
|
+
- fastlane/lib/fastlane/actions/.run_tests.rb.swp
|
1019
1021
|
- fastlane/lib/fastlane/actions/README.md
|
1020
1022
|
- fastlane/lib/fastlane/actions/actions_helper.rb
|
1021
1023
|
- fastlane/lib/fastlane/actions/adb.rb
|
@@ -1576,6 +1578,8 @@ files:
|
|
1576
1578
|
- scan/lib/assets/ScanfileTemplate
|
1577
1579
|
- scan/lib/assets/ScanfileTemplate.swift
|
1578
1580
|
- scan/lib/scan.rb
|
1581
|
+
- scan/lib/scan/.error_handler.rb.swp
|
1582
|
+
- scan/lib/scan/.runner.rb.swp
|
1579
1583
|
- scan/lib/scan/commands_generator.rb
|
1580
1584
|
- scan/lib/scan/detect_values.rb
|
1581
1585
|
- scan/lib/scan/error_handler.rb
|
@@ -1846,6 +1850,7 @@ files:
|
|
1846
1850
|
- trainer/lib/.DS_Store
|
1847
1851
|
- trainer/lib/assets/junit.xml.erb
|
1848
1852
|
- trainer/lib/trainer.rb
|
1853
|
+
- trainer/lib/trainer/.options.rb.swp
|
1849
1854
|
- trainer/lib/trainer/commands_generator.rb
|
1850
1855
|
- trainer/lib/trainer/junit_generator.rb
|
1851
1856
|
- trainer/lib/trainer/module.rb
|
@@ -1890,9 +1895,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1890
1895
|
version: '2.5'
|
1891
1896
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1892
1897
|
requirements:
|
1893
|
-
- - "
|
1898
|
+
- - ">="
|
1894
1899
|
- !ruby/object:Gem::Version
|
1895
|
-
version:
|
1900
|
+
version: '0'
|
1896
1901
|
requirements: []
|
1897
1902
|
rubygems_version: 3.2.3
|
1898
1903
|
signing_key:
|