handle new CV run ended message

As announced in http://g/luci-announce/d5-USDV4YXQ, the run pass
and failure message will be changed as part of CQ -> CV migration.
This CL allows the tool to handle both old style and new style
messages.

Change-Id: Ia06c05eeff321b26af92dc67bd41747e60d9b071
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3914865
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
This commit is contained in:
Yiwei Zhang 2022-09-22 18:35:16 +00:00 committed by crosvm LUCI
parent 2a8339f85d
commit 2d1d44b6df

View file

@ -251,7 +251,9 @@ def update_dry_runs(
continue
last_luci_message = luci_messages[-1]
if "This CL passed the CQ dry run" in last_luci_message:
if "This CL passed the CQ dry run" in last_luci_message or (
"This CL has passed the run" in last_luci_message
):
dry_run.review(
"I think this dry run was SUCCESSFUL.",
{
@ -259,7 +261,9 @@ def update_dry_runs(
"Bot-Commit": 0,
},
)
elif "Failed builds" in last_luci_message:
elif "Failed builds" in last_luci_message or (
"This CL has failed the run. Reason:" in last_luci_message
):
dry_run.review(
"I think this dry run FAILED.",
{