From 7aa25f02edcda25e2b26d7bce0afba3054f5f70b Mon Sep 17 00:00:00 2001 From: Nikolay Shirokovskiy Date: Tue, 16 Jul 2024 14:05:33 +0300 Subject: [PATCH] Fail if core=tarantool default server failed Currently we stop default server in worker run loop only before the next test start. So the previous test does not account whether the Tarantool executing the test exits successfully or not. Thus we do not fail on memory leaks for example. Let's stop the server and account its exit status in test. Closes #416 --- lib/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/test.py b/lib/test.py index 69ba60ad..67dc4191 100644 --- a/lib/test.py +++ b/lib/test.py @@ -218,6 +218,7 @@ def run(self, server): sys.stdout.flush() is_tap = False + is_crashed = False if not self.skip: if not os.path.exists(self.tmp_result): self.is_executed_ok = False @@ -233,6 +234,9 @@ def run(self, server): is_tap, is_ok, is_skip = self.check_tap_output() self.is_equal_result = is_ok self.skip = is_skip + + server.stop(silent=True) + is_crashed = server.current_test.is_crash_reported else: self.is_equal_result = 1 @@ -250,7 +254,8 @@ def run(self, server): os.remove(self.tmp_result) elif (self.is_executed_ok and self.is_equal_result and - self.is_valgrind_clean): + self.is_valgrind_clean and + not is_crashed): short_status = 'pass' color_stdout("[ pass ]\n", schema='test_pass') if os.path.exists(self.tmp_result):