@@ -55,16 +55,7 @@ def attempt_multiline(message, &block)
55
55
56
56
# Make a nice status for something that kills the script immediately on failure
57
57
def assure ( message , &block )
58
- perform_action ( message , false , "This may indicate a problem with ArduinoCI, or your configuration" , true , &block )
59
- end
60
-
61
- # Assure that a platform exists and return its definition
62
- def assured_platform ( purpose , name , config )
63
- platform_definition = config . platform_definition ( name )
64
- assure ( "Requested #{ purpose } platform '#{ name } ' is defined in 'platforms' YML" ) do
65
- !platform_definition . nil?
66
- end
67
- platform_definition
58
+ perform_action ( message , false , "This may indicate a problem with ArduinoCI!" , true , &block )
68
59
end
69
60
70
61
# initialize command and config
@@ -94,11 +85,10 @@ def assured_platform(purpose, name, config)
94
85
# while we're doing that, get the aux libraries as well
95
86
all_platforms = { }
96
87
aux_libraries = Set . new ( config . aux_libraries_for_unittest + config . aux_libraries_for_build )
97
- # while collecting the platforms, ensure they're defined
98
- config . platforms_to_unittest . each { |p | all_platforms [ p ] = assured_platform ( "unittest" , p , config ) }
88
+ config . platforms_to_unittest . each { |p | all_platforms [ p ] = config . platform_definition ( p ) }
99
89
library_examples . each do |path |
100
90
ovr_config = config . from_example ( path )
101
- ovr_config . platforms_to_build . each { |p | all_platforms [ p ] = assured_platform ( "library example" , p , config ) }
91
+ ovr_config . platforms_to_build . each { |p | all_platforms [ p ] = config . platform_definition ( p ) }
102
92
aux_libraries . merge ( ovr_config . aux_libraries_for_build )
103
93
end
104
94
0 commit comments