twister: bugfix: Fix infinite loop in test_plan.py script

Commit 72f416f382 added a horizontal
scan for .yaml files when a modification was made in "common" folder.
If yamls were found in such way, the loop ended. However, the
implementation didn't address what happens if such yamls are not found.
This made the script going into an infinite loop. If yamls are not
found next to "common", the script should proceed as before, i.e. go
to the directory above an start looking there.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This commit is contained in:
Maciej Perkowski 2023-10-30 15:24:09 +01:00 committed by Anas Nashif
commit 3314b8e0c3

View file

@ -284,6 +284,8 @@ class Filters:
tests.add(os.path.dirname(yaml))
self.resolved_files.append(f)
scope_found = True
else:
d = os.path.dirname(d)
else:
d = os.path.dirname(d)