From 1abaa6fddc242f226b88c7c7f6aa649c225741ff Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 18 Dec 2019 15:24:40 +0100 Subject: [PATCH] Benchmark only exits when running as test from cli --- plugins/Benchmark/BenchmarkPlugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Benchmark/BenchmarkPlugin.py b/plugins/Benchmark/BenchmarkPlugin.py index 1916a664..f22e6a26 100644 --- a/plugins/Benchmark/BenchmarkPlugin.py +++ b/plugins/Benchmark/BenchmarkPlugin.py @@ -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)