Patch notification service
This commit is contained in:
@@ -160,15 +160,18 @@ 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():
|
||||||
with open(file_path.replace("[]", "stats")) as f:
|
try:
|
||||||
failed, success, time_spent = handle_test_results(f.read())
|
with open(file_path.replace("[]", "stats")) as f:
|
||||||
results[job]["failed"] += failed
|
failed, success, time_spent = handle_test_results(f.read())
|
||||||
results[job]["success"] += success
|
results[job]["failed"] += failed
|
||||||
results[job]["time_spent"] += time_spent[1:-1] + ", "
|
results[job]["success"] += success
|
||||||
with open(file_path.replace("[]", "summary_short")) as f:
|
results[job]["time_spent"] += time_spent[1:-1] + ", "
|
||||||
for line in f:
|
with open(file_path.replace("[]", "summary_short")) as f:
|
||||||
if re.search("FAILED", line):
|
for line in f:
|
||||||
results[job]["failures"] += line
|
if re.search("FAILED", 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]
|
||||||
|
|||||||
Reference in New Issue
Block a user