fastlane-plugin-test_center 3.2.6 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/test_center/actions/collate_html_reports.rb +8 -4
- data/lib/fastlane/plugin/test_center/actions/multi_scan.rb +2 -1
- data/lib/fastlane/plugin/test_center/actions/suppress_tests.rb +50 -3
- data/lib/fastlane/plugin/test_center/actions/suppressed_tests.rb +47 -4
- data/lib/fastlane/plugin/test_center/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 893544a3b0cd2e53515d862eb0fda5c3e55f6894
|
4
|
+
data.tar.gz: 4fb54967fc84179a6de35c8314d7018396b5170a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 888c640ec758d5916be8414d1f7a5940c51c28736bdd172e3ceda86fbbf6b50ea74071c07397b4bae3ca2e5ddc9f18f853f3fd11b074eb9b26db894e1f9b67e3
|
7
|
+
data.tar.gz: 3b65a9bb1175eaedd4ba0fb937ea62538a037ff785f3837cd6f1061f22a52d2ac06633691ad85021fe43f6b30e7586ffce4ac14cb662fb489032c4923fe24163
|
@@ -29,12 +29,16 @@ module Fastlane
|
|
29
29
|
def self.opened_reports(report_filepaths)
|
30
30
|
report_filepaths.map do |report_filepath|
|
31
31
|
report = nil
|
32
|
-
|
32
|
+
repair_attempted = false
|
33
33
|
begin
|
34
34
|
report = REXML::Document.new(File.new(report_filepath))
|
35
|
-
rescue REXML::ParseException
|
36
|
-
|
37
|
-
|
35
|
+
rescue REXML::ParseException => e
|
36
|
+
if repair_attempted
|
37
|
+
UI.important("'#{report_filepath}' is malformed and :collate_html_reports cannot repair it")
|
38
|
+
raise e
|
39
|
+
else
|
40
|
+
UI.important("'#{report_filepath}' is malformed. Attempting to repair it")
|
41
|
+
repair_attempted = true
|
38
42
|
repair_malformed_html(report_filepath)
|
39
43
|
retry
|
40
44
|
end
|
@@ -4,14 +4,14 @@ module Fastlane
|
|
4
4
|
require 'xcodeproj'
|
5
5
|
|
6
6
|
def self.run(params)
|
7
|
-
project_path = params[:xcodeproj]
|
8
7
|
all_tests_to_skip = params[:tests]
|
9
8
|
scheme = params[:scheme]
|
10
9
|
|
11
|
-
scheme_filepaths =
|
10
|
+
scheme_filepaths = schemes_from_project(params[:xcodeproj], scheme) || schemes_from_workspace(params[:workspace], scheme)
|
12
11
|
if scheme_filepaths.length.zero?
|
13
12
|
UI.user_error!("Error: cannot find any scheme named #{scheme}") unless scheme.nil?
|
14
|
-
UI.user_error!("Error: cannot find any schemes in the Xcode project")
|
13
|
+
UI.user_error!("Error: cannot find any schemes in the Xcode project") if params[:xcodeproj]
|
14
|
+
UI.user_error!("Error: cannot find any schemes in the Xcode workspace") if params[:workspace]
|
15
15
|
end
|
16
16
|
|
17
17
|
scheme_filepaths.each do |scheme_filepath|
|
@@ -35,6 +35,26 @@ module Fastlane
|
|
35
35
|
nil
|
36
36
|
end
|
37
37
|
|
38
|
+
def self.schemes_from_project(project_path, scheme)
|
39
|
+
return nil unless project_path
|
40
|
+
|
41
|
+
Dir.glob("#{project_path}/{xcshareddata,xcuserdata}/**/xcschemes/#{scheme || '*'}.xcscheme")
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.schemes_from_workspace(workspace_path, scheme)
|
45
|
+
return nil unless workspace_path
|
46
|
+
|
47
|
+
xcworkspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace_path)
|
48
|
+
scheme_filepaths = []
|
49
|
+
xcworkspace.file_references.each do |file_reference|
|
50
|
+
next if file_reference.path.include?('Pods/Pods.xcodeproj')
|
51
|
+
|
52
|
+
project_path = file_reference.absolute_path(File.dirname(workspace_path))
|
53
|
+
scheme_filepaths.concat(schemes_from_project(project_path, scheme))
|
54
|
+
end
|
55
|
+
scheme_filepaths
|
56
|
+
end
|
57
|
+
|
38
58
|
#####################################################
|
39
59
|
# @!group Documentation
|
40
60
|
#####################################################
|
@@ -48,12 +68,25 @@ module Fastlane
|
|
48
68
|
FastlaneCore::ConfigItem.new(
|
49
69
|
key: :xcodeproj,
|
50
70
|
env_name: "FL_SUPPRESS_TESTS_XCODE_PROJECT",
|
71
|
+
optional: true,
|
51
72
|
description: "The file path to the Xcode project file to modify",
|
52
73
|
verify_block: proc do |path|
|
53
74
|
UI.user_error!("Error: Xcode project file path not given!") unless path and !path.empty?
|
54
75
|
UI.user_error!("Error: Xcode project '#{path}' not found!") unless Dir.exist?(path)
|
55
76
|
end
|
56
77
|
),
|
78
|
+
FastlaneCore::ConfigItem.new(
|
79
|
+
key: :workspace,
|
80
|
+
env_name: "FL_SUPPRESS_TESTS_XCODE_WORKSPACE",
|
81
|
+
optional: true,
|
82
|
+
description: "The file path to the Xcode workspace file to modify",
|
83
|
+
verify_block: proc do |value|
|
84
|
+
v = File.expand_path(value.to_s)
|
85
|
+
UI.user_error!("Workspace file not found at path '#{v}'") unless Dir.exist?(v)
|
86
|
+
UI.user_error!("Workspace file invalid") unless File.directory?(v)
|
87
|
+
UI.user_error!("Workspace file is not a workspace, must end with .xcworkspace") unless v.include?(".xcworkspace")
|
88
|
+
end
|
89
|
+
),
|
57
90
|
FastlaneCore::ConfigItem.new(
|
58
91
|
key: :tests,
|
59
92
|
env_name: "FL_SUPPRESS_TESTS_TESTS_TO_SUPPRESS",
|
@@ -109,6 +142,20 @@ module Fastlane
|
|
109
142
|
],
|
110
143
|
scheme: 'Professor'
|
111
144
|
)
|
145
|
+
",
|
146
|
+
"
|
147
|
+
UI.important(
|
148
|
+
'example: ' \\
|
149
|
+
'suppress some tests in one Scheme from a workspace'
|
150
|
+
)
|
151
|
+
suppress_tests(
|
152
|
+
workspace: 'AtomicBoy/AtomicBoy.xcworkspace',
|
153
|
+
tests: [
|
154
|
+
'AtomicBoyUITests/HappyNapperTests/testBeepingNonExistentFriendDisplaysError',
|
155
|
+
'AtomicBoyUITests/GrumpyWorkerTests'
|
156
|
+
],
|
157
|
+
scheme: 'Professor'
|
158
|
+
)
|
112
159
|
"
|
113
160
|
]
|
114
161
|
end
|
@@ -4,13 +4,12 @@ module Fastlane
|
|
4
4
|
require 'set'
|
5
5
|
|
6
6
|
def self.run(params)
|
7
|
-
project_path = params[:xcodeproj]
|
8
7
|
scheme = params[:scheme]
|
9
|
-
|
10
|
-
scheme_filepaths = Dir.glob("#{project_path}/{xcshareddata,xcuserdata}/**/xcschemes/#{scheme || '*'}.xcscheme")
|
8
|
+
scheme_filepaths = schemes_from_project(params[:xcodeproj], scheme) || schemes_from_workspace(params[:workspace], scheme)
|
11
9
|
if scheme_filepaths.length.zero?
|
12
10
|
UI.user_error!("Error: cannot find any scheme named #{scheme}") unless scheme.nil?
|
13
|
-
UI.user_error!("Error: cannot find any schemes in the Xcode project")
|
11
|
+
UI.user_error!("Error: cannot find any schemes in the Xcode project") if params[:xcodeproj]
|
12
|
+
UI.user_error!("Error: cannot find any schemes in the Xcode workspace") if params[:workspace]
|
14
13
|
end
|
15
14
|
|
16
15
|
skipped_tests = Set.new
|
@@ -29,6 +28,26 @@ module Fastlane
|
|
29
28
|
skipped_tests.to_a
|
30
29
|
end
|
31
30
|
|
31
|
+
def self.schemes_from_project(project_path, scheme)
|
32
|
+
return nil unless project_path
|
33
|
+
|
34
|
+
Dir.glob("#{project_path}/{xcshareddata,xcuserdata}/**/xcschemes/#{scheme || '*'}.xcscheme")
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.schemes_from_workspace(workspace_path, scheme)
|
38
|
+
return nil unless workspace_path
|
39
|
+
|
40
|
+
xcworkspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace_path)
|
41
|
+
scheme_filepaths = []
|
42
|
+
xcworkspace.file_references.each do |file_reference|
|
43
|
+
next if file_reference.path.include?('Pods/Pods.xcodeproj')
|
44
|
+
|
45
|
+
project_path = file_reference.absolute_path(File.dirname(workspace_path))
|
46
|
+
scheme_filepaths.concat(schemes_from_project(project_path, scheme))
|
47
|
+
end
|
48
|
+
scheme_filepaths
|
49
|
+
end
|
50
|
+
|
32
51
|
#####################################################
|
33
52
|
# @!group Documentation
|
34
53
|
#####################################################
|
@@ -42,12 +61,25 @@ module Fastlane
|
|
42
61
|
FastlaneCore::ConfigItem.new(
|
43
62
|
key: :xcodeproj,
|
44
63
|
env_name: "FL_SUPPRESSED_TESTS_XCODE_PROJECT",
|
64
|
+
optional: true,
|
45
65
|
description: "The file path to the Xcode project file to read the skipped tests from",
|
46
66
|
verify_block: proc do |path|
|
47
67
|
UI.user_error!("Error: Xcode project file path not given!") unless path and !path.empty?
|
48
68
|
UI.user_error!("Error: Xcode project '#{path}' not found!") unless Dir.exist?(path)
|
49
69
|
end
|
50
70
|
),
|
71
|
+
FastlaneCore::ConfigItem.new(
|
72
|
+
key: :workspace,
|
73
|
+
env_name: "FL_SUPPRESSED_TESTS_XCODE_WORKSPACE",
|
74
|
+
optional: true,
|
75
|
+
description: "The file path to the Xcode workspace file to read the skipped tests from",
|
76
|
+
verify_block: proc do |value|
|
77
|
+
v = File.expand_path(value.to_s)
|
78
|
+
UI.user_error!("Workspace file not found at path '#{v}'") unless Dir.exist?(v)
|
79
|
+
UI.user_error!("Workspace file invalid") unless File.directory?(v)
|
80
|
+
UI.user_error!("Workspace file is not a workspace, must end with .xcworkspace") unless v.include?(".xcworkspace")
|
81
|
+
end
|
82
|
+
),
|
51
83
|
FastlaneCore::ConfigItem.new(
|
52
84
|
key: :scheme,
|
53
85
|
optional: true,
|
@@ -81,6 +113,17 @@ module Fastlane
|
|
81
113
|
UI.message(
|
82
114
|
\"Suppressed tests for project: \#{suppressed_tests(xcodeproj: 'AtomicBoy/AtomicBoy.xcodeproj')}\"
|
83
115
|
)
|
116
|
+
",
|
117
|
+
"
|
118
|
+
UI.important(
|
119
|
+
'example: ' \\
|
120
|
+
'get the tests that are suppressed in all Schemes in a workspace'
|
121
|
+
)
|
122
|
+
tests = suppressed_tests(
|
123
|
+
workspace: File.absolute_path('../AtomicBoy/AtomicBoy.xcworkspace'),
|
124
|
+
scheme: 'Professor'
|
125
|
+
)
|
126
|
+
UI.message(\"tests: \#{tests}\")
|
84
127
|
"
|
85
128
|
]
|
86
129
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-test_center
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plist
|