Skip to content

Commit 946314c

Browse files
committed
Fix multithreaded symlink crash
1 parent 7c38dc1 commit 946314c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

problemtools/verifyproblem.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,10 +1730,12 @@ def _gather_testcases(self, item: TestCase | TestCaseGroup) -> list[TestCase]:
17301730
if not item.matches_filter(self._context.data_filter):
17311731
return []
17321732
if isinstance(item, TestCase):
1733-
if item.reuse_result_from:
1734-
return self._gather_testcases(item.reuse_result_from)
1735-
else:
1736-
return [item]
1733+
# If testcase is symlink, recursively follow the symlinks until we get a real testcase, ignoring
1734+
# whether the name of testcases pointed to matches the filter
1735+
while item.reuse_result_from:
1736+
item = item.reuse_result_from
1737+
1738+
return [item]
17371739
elif item not in self._done_groups:
17381740
ret = []
17391741
for child in item.get_testcases() + item.get_subgroups():

0 commit comments

Comments
 (0)