mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
docs: fix invalid test status in gnu-full-result
This commit is contained in:
parent
1ef1551260
commit
e8f7395a8a
1 changed files with 7 additions and 3 deletions
|
@ -3,9 +3,9 @@ Extract the GNU logs into a JSON file.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from pathlib import Path
|
import re
|
||||||
import sys
|
import sys
|
||||||
from os import environ
|
from pathlib import Path
|
||||||
|
|
||||||
out = {}
|
out = {}
|
||||||
|
|
||||||
|
@ -20,7 +20,11 @@ for filepath in test_dir.glob("**/*.log"):
|
||||||
try:
|
try:
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
current[path.name] = content.split("\n")[-2].split(" ")[0]
|
result = re.search(
|
||||||
|
r"(PASS|FAIL|SKIP|ERROR) [^ ]+ \(exit status: \d+\)$", content
|
||||||
|
)
|
||||||
|
if result:
|
||||||
|
current[path.name] = result.group(1)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue