tarantool / test-run

Tarantool functional testing framework
14 stars 15 forks source link

Unclear error indication for failed tarantool #350

Open tsafin opened 1 year ago

tsafin commented 1 year ago

If you happen to screw up tarantool startup (i.e. via malformed builtin module), then you will end up with very confusing error in test-run

image

The reason could become clearer if one would disable redirection to /dev/null of error. i.e. with:

diff --git a/lib/luatest_server.py b/lib/luatest_server.py
index eed96a8..a085b2e 100644
--- a/lib/luatest_server.py
+++ b/lib/luatest_server.py
@@ -99,9 +99,7 @@ class LuatestServer(Server):
         try:
             # Just check that the command returns zero exit code.
             with open(os.devnull, 'w') as devnull:
-                returncode = Popen(['luatest', '--version'],
-                                   stdout=devnull,
-                                   stderr=devnull).wait()
+                returncode = Popen(['luatest', '--version']).wait()
             if returncode != 0:
                 raise TestRunInitError('Unable to run `luatest --version`',
                                        {'returncode': returncode})

I could see that there was error in tarantool like:

Started ./test-run.py --builddir ../build -j1 --verbose --debug app-tap/
Running in parallel with 1 workers

Timeout options:
-------------------
SERVER_START_TIMEOUT:     90
REPLICATION_SYNC_TIMEOUT: 100
TEST_TIMEOUT:             110
NO_OUTPUT_TIMEOUT:        120

Error loading Lua module luadebug...: builtin/luadebug.lua:312: '<eof>' expected near 'end'
('Unable to run `luatest --version`', {'returncode': 1})

We need to make this error apparent without further test-run massaging.