Let verify command return different return codes depending on results.

Change-Id: Ie49856573dbf5bcf87837c555c046b06c569b3e9
This commit is contained in:
Marian Gasparovic 2021-01-19 16:30:08 +01:00
parent 412680357a
commit a72a6e1ce5
2 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,14 @@ Changelog
.. Release notes for existing releases are MUTABLE! If there is something that
was missed or can be improved, feel free to change it!
[x.x.x] - 202x-xx-xx
--------------------
Changed
~~~~~
* ``rally verify`` returns 0 on success, 1, 2 or 3 depending on detected issue.
[3.2.0] - 2020-10-30
--------------------

View File

@ -526,6 +526,13 @@ class VerifyCommands(object):
else:
print("Verification UUID: %s." % verification_uuid)
if results["totals"]["unexpected_success"] > 0:
return 2
if results["totals"]["failures"] > 0:
return 3
return 0
@cliutils.help_group("verification")
@cliutils.args("--uuid", dest="verification_uuid", type=str, required=True,
help="Verification UUID. " + LIST_VERIFICATIONS_HINT)