Skip to content

Commit

Permalink
automated: linux: gpiod: parse-output: drop 'tests' prefix
Browse files Browse the repository at this point in the history
The output of the test name always starts with a '_' which is wrong.
Removing that by remove the prefixed '{tests}_' the testname, and the
'tests' variable was assigned to an empty string. This resulted in that
the testname started with a prefix '_'.

Signed-off-by: Anders Roxell <[email protected]>
  • Loading branch information
roxell committed Dec 3, 2024
1 parent d65a795 commit 544711c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions automated/linux/gpiod/parse-output.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ def slugify(line):
)


tests = ""
for line in sys.stdin:
if re.search(r"^.*?not ok \d{1,5} ", line):
match = re.match(r"^.*?not ok [0-9]+ (.*?)$", line)
ascii_test_line = slugify(re.sub("# .*$", "", match.group(1)))
output = f"{tests}_{ascii_test_line} fail"
output = f"{ascii_test_line} fail"
print(f"{output}")
elif re.search(r"^ok \d{1,5} ", line):
match = re.match(r"^.*?ok [0-9]+ (.*?)$", line)
ascii_test_line = slugify(match.group(1))
output = f"{tests}_{ascii_test_line} pass"
output = f"{ascii_test_line} pass"
print(f"{output}")

0 comments on commit 544711c

Please sign in to comment.