From 1b66533273d76493b0291717405f46667298288f Mon Sep 17 00:00:00 2001 From: Mateusz Bloch Date: Mon, 7 Aug 2023 13:22:20 +0200 Subject: [PATCH] trunner: run tests alphabetically JIRA CI-310 --- trunner/test_runner.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/trunner/test_runner.py b/trunner/test_runner.py index 153d96536..edf68d51f 100644 --- a/trunner/test_runner.py +++ b/trunner/test_runner.py @@ -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") @@ -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: