"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e95d433d77727a9babadf008dd621a2326d37303"
Commit 60d5bda4 authored by Lysandre's avatar Lysandre
Browse files

Patch notification service

parent b29eb247
...@@ -160,6 +160,7 @@ if __name__ == "__main__": ...@@ -160,6 +160,7 @@ if __name__ == "__main__":
results[job] = {"failed": 0, "success": 0, "time_spent": "", "failures": ""} results[job] = {"failed": 0, "success": 0, "time_spent": "", "failures": ""}
for key, file_path in file_dict.items(): for key, file_path in file_dict.items():
try:
with open(file_path.replace("[]", "stats")) as f: with open(file_path.replace("[]", "stats")) as f:
failed, success, time_spent = handle_test_results(f.read()) failed, success, time_spent = handle_test_results(f.read())
results[job]["failed"] += failed results[job]["failed"] += failed
...@@ -169,6 +170,8 @@ if __name__ == "__main__": ...@@ -169,6 +170,8 @@ if __name__ == "__main__":
for line in f: for line in f:
if re.search("FAILED", line): if re.search("FAILED", line):
results[job]["failures"] += line results[job]["failures"] += line
except FileNotFoundError:
print("Artifact was not found, job was probably canceled.")
# Remove the trailing ", " # Remove the trailing ", "
results[job]["time_spent"] = results[job]["time_spent"][:-2] results[job]["time_spent"] = results[job]["time_spent"][:-2]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment