diff --git a/tools/ci/idf_ci_utils.py b/tools/ci/idf_ci_utils.py index d76468dee63..6327e4fa447 100644 --- a/tools/ci/idf_ci_utils.py +++ b/tools/ci/idf_ci_utils.py @@ -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]