Skip to content

Commit

Permalink
Fail if core=tarantool default server failed
Browse files Browse the repository at this point in the history
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 tarantool#416
  • Loading branch information
nshy committed Jul 16, 2024
1 parent dd00063 commit 7aa25f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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):
Expand Down

0 comments on commit 7aa25f0

Please sign in to comment.