Skip to content

Commit 1d9ce86

Browse files
jeremybettiscarlescufi
authored andcommitted
twister: Don't require test_ prefix to set status
If a test doesn't start with test_, twister currently emits an error: suite_name.test_name: Unknown status 'started' Following the suggestion by Maksim Masalski on PR#21191, change the regex to exclude spaces in the test name, and remove the check that the test_ prefix exists. See also #21162 Signed-off-by: Jeremy Bettis <[email protected]>
1 parent cd265fd commit 1d9ce86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/pylib/twister/twisterlib/harness.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
_WINDOWS = platform.system() == 'Windows'
2525

2626

27-
result_re = re.compile(r".*(PASS|FAIL|SKIP) - (test_)?(.*) in (\d*[.,]?\d*) seconds")
27+
result_re = re.compile(r".*(PASS|FAIL|SKIP) - (test_)?(\S*) in (\d*[.,]?\d*) seconds")
2828
class Harness:
2929
GCOV_START = "GCOV_COVERAGE_DUMP_START"
3030
GCOV_END = "GCOV_COVERAGE_DUMP_END"
@@ -527,7 +527,7 @@ def handle(self, line):
527527

528528
result_match = result_re.match(line)
529529

530-
if result_match and result_match.group(2):
530+
if result_match:
531531
matched_status = result_match.group(1)
532532
name = "{}.{}".format(self.id, result_match.group(3))
533533
tc = self.instance.get_case_or_create(name)

0 commit comments

Comments
 (0)