@@ -260,15 +260,20 @@ def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> st
260
260
Returns:
261
261
valid build directory
262
262
"""
263
-
264
- check_dirs = []
265
- if target is not None and config is not None :
266
- check_dirs .append (f'build_{ target } _{ config } ' )
267
- if target is not None :
268
- check_dirs .append (f'build_{ target } ' )
269
- if config is not None :
270
- check_dirs .append (f'build_{ config } ' )
271
- check_dirs .append ('build' )
263
+ if target == 'linux' :
264
+ # IDF-6644
265
+ # hard-coded in components/esp_partition/partition_linux.c
266
+ # const char *partition_table_file_name = "build/partition_table/partition-table.bin";
267
+ check_dirs = ['build' ]
268
+ else :
269
+ check_dirs = []
270
+ if target is not None and config is not None :
271
+ check_dirs .append (f'build_{ target } _{ config } ' )
272
+ if target is not None :
273
+ check_dirs .append (f'build_{ target } ' )
274
+ if config is not None :
275
+ check_dirs .append (f'build_{ config } ' )
276
+ check_dirs .append ('build' )
272
277
273
278
for check_dir in check_dirs :
274
279
binary_path = os .path .join (app_path , check_dir )
@@ -284,6 +289,15 @@ def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> st
284
289
)
285
290
286
291
292
+ @pytest .fixture (autouse = True )
293
+ def linux_cd_into_app_folder (app_path : str , target : Optional [str ]) -> None :
294
+ # IDF-6644
295
+ # hard-coded in components/esp_partition/partition_linux.c
296
+ # const char *partition_table_file_name = "build/partition_table/partition-table.bin";
297
+ if target == 'linux' :
298
+ os .chdir (app_path )
299
+
300
+
287
301
@pytest .fixture (autouse = True )
288
302
@multi_dut_fixture
289
303
def junit_properties (test_case_name : str , record_xml_attribute : Callable [[str , object ], None ]) -> None :
@@ -327,6 +341,7 @@ def real_func(item: str, value: float, target: str) -> None:
327
341
:param target: target chip
328
342
:raise: AssertionError: if check fails
329
343
"""
344
+
330
345
def _find_perf_item (operator : str , path : str ) -> float :
331
346
with open (path , 'r' ) as f :
332
347
data = f .read ()
0 commit comments