Skip to content

Commit

Permalink
Merge branch 'bugfix/ci_pytest_7.x' into 'master'
Browse files Browse the repository at this point in the history
ci: make pytest build script compatible with pytest 7.x

See merge request espressif/esp-idf!17032
  • Loading branch information
igrr committed Feb 5, 2022
2 parents 4c6d72b + 21834f8 commit 3441dd1
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 3441dd1

Please sign in to comment.