Benchmark only exits when running as test from cli
This commit is contained in:
parent
7ecf09a496
commit
1abaa6fddc
|
@ -189,7 +189,8 @@ class ActionsPlugin:
|
||||||
|
|
||||||
if not res:
|
if not res:
|
||||||
yield "! No tests found"
|
yield "! No tests found"
|
||||||
sys.exit(1)
|
if config.action == "test":
|
||||||
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
num_failed = len([res_key for res_key, res_val in res.items() if res_val != "ok"])
|
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"])
|
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_avg = sum(multiplers) / len(multiplers)
|
||||||
multipler_title = self.getMultiplerTitle(multipler_avg)
|
multipler_title = self.getMultiplerTitle(multipler_avg)
|
||||||
yield " - Average speed factor: %.2fx (%s)" % (multipler_avg, multipler_title)
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue