Benchmark only exits when running as test from cli

This commit is contained in:
shortcutme 2019-12-18 15:24:40 +01:00
parent 7ecf09a496
commit 1abaa6fddc
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 3 additions and 2 deletions

View File

@ -189,7 +189,8 @@ class ActionsPlugin:
if not res:
yield "! No tests found"
sys.exit(1)
if config.action == "test":
sys.exit(1)
else:
num_failed = len([res_key for res_key, res_val in res.items() if res_val != "ok"])
num_success = len([res_key for res_key, res_val in res.items() if res_val != "ok"])
@ -201,7 +202,7 @@ class ActionsPlugin:
multipler_avg = sum(multiplers) / len(multiplers)
multipler_title = self.getMultiplerTitle(multipler_avg)
yield " - Average speed factor: %.2fx (%s)" % (multipler_avg, multipler_title)
if num_failed == 0:
if num_failed == 0 and config.action == "test":
sys.exit(1)