mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: sort pytest test cases by app path
This commit is contained in:
parent
d7aa99ac2d
commit
d2f5f3549e
@ -49,7 +49,7 @@ class IdfPytestEmbedded:
|
||||
# implement like this since this is a limitation of pytest, couldn't get fixture values while collecting
|
||||
# https://github.com/pytest-dev/pytest/discussions/9689
|
||||
if not hasattr(item, 'callspec'):
|
||||
raise ValueError(f'Function {item} does not have params')
|
||||
return default
|
||||
|
||||
return item.callspec.params.get(key, default) or default
|
||||
|
||||
@ -177,7 +177,11 @@ class IdfPytestEmbedded:
|
||||
# finally!
|
||||
filtered_items.append(item)
|
||||
|
||||
items[:] = filtered_items[:]
|
||||
# sort the test cases with (app folder, config)
|
||||
items[:] = sorted(
|
||||
filtered_items,
|
||||
key=lambda x: (os.path.dirname(x.path), self.get_param(x, 'config', DEFAULT_SDKCONFIG))
|
||||
)
|
||||
|
||||
def pytest_report_collectionfinish(self, items: t.List[Function]) -> None:
|
||||
for item in items:
|
||||
|
Loading…
x
Reference in New Issue
Block a user