Skip to content

Commit

Permalink
trunner: run tests alphabetically
Browse files Browse the repository at this point in the history
JIRA CI-310
  • Loading branch information
mateusz-bloch committed Aug 7, 2023
1 parent 0cb61c4 commit 1b66533
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion trunner/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ def search_for_tests(self) -> List[Path]:
yamls = []

if path.is_dir():
yamls = list(path.rglob("test*.yaml")) + list(path.rglob("test*.yml"))
for p in list(path.rglob("test*.yaml")) + list(path.rglob("test*.yml")):
if ".git" not in str(p):
yamls.append(p)
if not yamls:
raise ValueError(f"{path} does not contain .yaml test configuration")
else:
yamls.sort()
elif path.is_file():
if path.suffix != ".yaml" and path.suffix != ".yml":
raise ValueError("Test configuration must be a file with .yaml or .yml extension")
Expand Down Expand Up @@ -160,6 +164,7 @@ def run_tests(self, tests: Sequence[TestOptions]):
last_test_failed = True

for test in tests:
print(test)
# By default we don't want to reboot the entire device to speed up the test execution)
# if not explicitly required by the test.
if last_test_failed:
Expand Down

0 comments on commit 1b66533

Please sign in to comment.