@@ -76,7 +76,7 @@ def find_apps(
76
76
## `preserve`
77
77
if 'preserve' in kwargs :
78
78
LOGGER .warning (
79
- 'Passing "preserve" directly is deprecated. '
79
+ 'DEPRECATED: Passing "preserve" directly is deprecated. '
80
80
'Pass "no_preserve" instead to disable preserving the build directory'
81
81
)
82
82
kwargs ['no_preserve' ] = not kwargs .pop ('preserve' )
@@ -103,11 +103,14 @@ def find_apps(
103
103
apps : t .Set [App ] = set ()
104
104
if find_arguments .target == 'all' :
105
105
targets = ALL_TARGETS
106
+ LOGGER .info ('Searching for apps by all targets' )
106
107
else :
107
108
targets = [find_arguments .target ]
109
+ LOGGER .info ('Searching for apps by target: %s' , find_arguments .target )
108
110
109
111
for _t in targets :
110
112
for _p in find_arguments .paths :
113
+ LOGGER .debug ('Searching for apps in path %s for target %s' , _p , _t )
111
114
apps .update (
112
115
_find_apps (
113
116
_p ,
@@ -117,7 +120,7 @@ def find_apps(
117
120
)
118
121
)
119
122
120
- LOGGER .info (f 'Found { len ( apps ) } apps in total' )
123
+ LOGGER .info ('Found %d apps in total' , len ( apps ) )
121
124
122
125
return sorted (apps )
123
126
@@ -141,7 +144,7 @@ def build_apps(
141
144
## `check_app_dependencies`
142
145
if 'check_app_dependencies' in kwargs :
143
146
LOGGER .warning (
144
- 'Passing "check_app_dependencies" directly is deprecated. '
147
+ 'DEPRECATED: Passing "check_app_dependencies" directly is deprecated. '
145
148
'Pass "modified_components" instead to enable dependency-driven build feature'
146
149
)
147
150
kwargs .pop ('check_app_dependencies' )
@@ -162,20 +165,22 @@ def build_apps(
162
165
test_suite = TestSuite ('build_apps' )
163
166
164
167
start , stop = get_parallel_start_stop (len (apps ), build_arguments .parallel_count , build_arguments .parallel_index )
165
- LOGGER .info ('Total %s apps. running build for app %s-%s ' , len (apps ), start , stop )
168
+ LOGGER .info ('Processing %d total apps: building apps %d-%d ' , len (apps ), start , stop )
166
169
167
170
# cleanup collect files if exists at this early-stage
168
171
for f in (build_arguments .collect_app_info , build_arguments .collect_size_info , build_arguments .junitxml ):
169
172
if f and os .path .isfile (f ):
173
+ LOGGER .debug ('Removing existing collect file: %s' , f )
170
174
os .remove (f )
171
- LOGGER .debug ('Remove existing collect file %s' , f )
172
175
173
176
exit_code = 0
174
177
175
178
# create empty files, avoid no file when no app is built
176
179
if build_arguments .collect_app_info :
180
+ LOGGER .debug ('Creating empty app info file: %s' , build_arguments .collect_app_info )
177
181
Path (build_arguments .collect_app_info ).touch ()
178
182
if build_arguments .collect_size_info :
183
+ LOGGER .debug ('Creating empty size info file: %s' , build_arguments .collect_size_info )
179
184
Path (build_arguments .collect_size_info ).touch ()
180
185
181
186
for i , app in enumerate (apps ):
@@ -189,7 +194,7 @@ def build_apps(
189
194
app .verbose = build_arguments .build_verbose
190
195
app .copy_sdkconfig = build_arguments .copy_sdkconfig
191
196
192
- LOGGER .info ('(%s/%s ) Building app: %s' , index , len (apps ), app )
197
+ LOGGER .info ('(%d/%d ) Building app: %s' , index , len (apps ), app )
193
198
194
199
app .build (
195
200
manifest_rootpath = build_arguments .manifest_rootpath ,
@@ -207,12 +212,14 @@ def build_apps(
207
212
if build_arguments .collect_app_info :
208
213
with open (build_arguments .collect_app_info , 'a' ) as fw :
209
214
fw .write (app .to_json () + '\n ' )
210
- LOGGER .debug ('Recorded app info in %s' , build_arguments .collect_app_info )
215
+ LOGGER .debug ('Recorded app info in file: %s' , build_arguments .collect_app_info )
211
216
212
217
if app .build_status == BuildStatus .FAILED :
213
218
if not build_arguments .keep_going :
219
+ LOGGER .error ('Build failed and keep_going=False, stopping build process' )
214
220
return 1
215
221
else :
222
+ LOGGER .warning ('Build failed but keep_going=True, continuing with next app' )
216
223
exit_code = 1
217
224
elif app .build_status == BuildStatus .SUCCESS :
218
225
if build_arguments .collect_size_info and app .size_json_path :
@@ -229,13 +236,12 @@ def build_apps(
229
236
)
230
237
+ '\n '
231
238
)
232
- LOGGER .debug ('Recorded size info file path in %s' , build_arguments .collect_size_info )
239
+ LOGGER .debug ('Recorded size info file path: %s' , build_arguments .collect_size_info )
233
240
234
241
LOGGER .info ('' ) # add one empty line for separating different builds
235
242
236
243
if build_arguments .junitxml :
237
244
TestReport ([test_suite ], build_arguments .junitxml ).create_test_report ()
238
- LOGGER .info ('Generated junit report for build apps: %s' , build_arguments .junitxml )
239
245
240
246
return exit_code
241
247
0 commit comments