Skip to content

Commit

Permalink
ci: make pytest build script compatible with pytest 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Feb 4, 2022
1 parent 93106c9 commit 21834f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/ci/idf_ci_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ def pytest_collection_modifyitems(self, items: List[Item]) -> None:
raise RuntimeError('pytest collection failed')

sys.stdout.flush() # print instantly
test_file_paths = set(node.fspath for node in collector.nodes)

try:
test_file_paths = set(node.path for node in collector.nodes)
except AttributeError:
# pytest 6.x
test_file_paths = set(node.fspath for node in collector.nodes)

return [os.path.dirname(file) for file in test_file_paths]

0 comments on commit 21834f8

Please sign in to comment.