From d9413c8d0c9d352491d89181a1069adc45b3a681 Mon Sep 17 00:00:00 2001 From: Eugine Blikh <bigbes@gmail.com> Date: Tue, 23 Jul 2013 14:14:53 +0400 Subject: [PATCH] Returning tests to their previous place. Fixing error in tarantool_connection, that prevernts reconnection. Fixing bug in cas.test --- test/big/{bitset.test => bitset.test.lua} | 0 test/big/{hash.test => hash.test.lua} | 0 ...multipart.test => hash_multipart.test.lua} | 0 test/big/{iterator.test => iterator.test.lua} | 0 test/big/{lua.test => lua.test.lua} | 0 test/{python => big}/sql.result | 0 test/{python/sql.test => big/sql.test.py} | 0 test/big/suite.ini | 4 +- test/big/{tree_pk.test => tree_pk.test.lua} | 0 ...tipart.test => tree_pk_multipart.test.lua} | 0 ...e_variants.test => tree_variants.test.lua} | 0 test/box/{admin.test => admin.test.py} | 0 test/{box_lua => box}/admin_coredump.result | 0 .../admin_coredump.test.lua} | 0 test/box/{args.test => args.test.py} | 0 test/{box_lua => box}/cjson.result | 0 .../cjson.test => box/cjson.test.lua} | 0 ...nfiguration.test => configuration.test.py} | 0 test/{box_lua => box}/errinj.result | 0 .../errinj.test => box/errinj.test.lua} | 0 test/{box_lua => box}/fiber.result | 0 .../fiber.test => box/fiber.test.lua} | 0 test/{box_lua => box}/info.result | 0 test/{box_lua/info.test => box/info.test.lua} | 0 test/{box_lua => box}/ipc.result | 0 test/{box_lua/ipc.test => box/ipc.test.lua} | 0 test/box/{iproto.test => iproto.test.py} | 0 test/box/{lua.test => lua.test.py} | 0 test/{box_lua => box}/lua_box_uuid.result | 0 test/{box_lua => box}/lua_box_uuid.skipcond | 0 .../lua_box_uuid.test.lua} | 0 test/{box_lua => box}/lua_misc.result | 0 .../lua_misc.test => box/lua_misc.test.lua} | 0 test/{box_lua => box}/net.box.result | 0 .../net.box.test => box/net.box.test.lua} | 0 test/{box_lua => box}/net_sql.mysql.result | 0 test/{box_lua => box}/net_sql.mysql.skipcond | 0 .../net_sql.mysql.test.lua} | 0 test/{box_lua => box}/net_sql.pg.result | 0 test/{box_lua => box}/net_sql.pg.skipcond | 0 .../net_sql.pg.test.lua} | 0 test/box/{protocol.test => protocol.test.py} | 0 .../{reconfigure.test => reconfigure.test.py} | 0 test/box/{session.test => session.test.py} | 0 test/box/{snapshot.test => snapshot.test.py} | 0 test/box/{socket.test => socket.test.py} | 0 test/box/{sql.test => sql.test.py} | 0 test/box/{stat.test => stat.test.py} | 0 test/box/suite.ini | 6 +- test/box/{xlog.test => xlog.test.py} | 0 test/box_lua/suite.ini | 6 - test/box_lua/tarantool.cfg | 45 -- .../{connector.test => connector.test.py} | 0 test/connector_c/{snap.test => snap.test.py} | 0 test/connector_c/suite.ini | 2 +- test/connector_c/{tp.test => tp.test.py} | 0 .../{update.test => update.test.py} | 0 .../{xlog_rpl.test => xlog_rpl.test.py} | 0 test/lib/admin_connection.py | 5 +- test/lib/tarantool_connection.py | 1 + test/lib/tarantool_server.py | 11 +- test/lib/test_suite.py | 7 +- .../{binary-get.test => binary-get.test.py} | 0 ...s-commands.test => bogus-commands.test.py} | 0 test/memcached/{cas.test => cas.test.py} | 2 +- .../{expirations.test => expirations.test.py} | 0 test/memcached/{flags.test => flags.test.py} | 0 .../{flush-all.test => flush-all.test.py} | 0 .../memcached/{getset.test => getset.test.py} | 0 .../{incrdecr.test => incrdecr.test.py} | 0 test/memcached/{lua.test => lua.test.py} | 0 ...ersioning.test => multiversioning.test.py} | 0 .../{noreply.test => noreply.test.py} | 0 test/memcached/{off.test => off.test.py} | 0 test/memcached/suite.ini | 2 +- test/python/suite.ini | 9 - test/python/tarantool.cfg | 396 ------------------ .../{consistent.test => consistent.test.py} | 0 .../{hot_standby.test => hot_standby.test.py} | 0 .../{memcached.test => memcached.test.py} | 0 test/replication/suite.ini | 4 +- test/replication/{swap.test => swap.test.py} | 0 test/wal/{lua.test => lua.test.py} | 0 test/wal/{oom.test => oom.test.py} | 0 test/wal/suite.ini | 2 +- test/wal/{wal_mode.test => wal_mode.test.py} | 0 86 files changed, 23 insertions(+), 479 deletions(-) rename test/big/{bitset.test => bitset.test.lua} (100%) rename test/big/{hash.test => hash.test.lua} (100%) rename test/big/{hash_multipart.test => hash_multipart.test.lua} (100%) rename test/big/{iterator.test => iterator.test.lua} (100%) rename test/big/{lua.test => lua.test.lua} (100%) rename test/{python => big}/sql.result (100%) rename test/{python/sql.test => big/sql.test.py} (100%) rename test/big/{tree_pk.test => tree_pk.test.lua} (100%) rename test/big/{tree_pk_multipart.test => tree_pk_multipart.test.lua} (100%) rename test/big/{tree_variants.test => tree_variants.test.lua} (100%) rename test/box/{admin.test => admin.test.py} (100%) rename test/{box_lua => box}/admin_coredump.result (100%) rename test/{box_lua/admin_coredump.test => box/admin_coredump.test.lua} (100%) rename test/box/{args.test => args.test.py} (100%) rename test/{box_lua => box}/cjson.result (100%) rename test/{box_lua/cjson.test => box/cjson.test.lua} (100%) rename test/box/{configuration.test => configuration.test.py} (100%) rename test/{box_lua => box}/errinj.result (100%) rename test/{box_lua/errinj.test => box/errinj.test.lua} (100%) rename test/{box_lua => box}/fiber.result (100%) rename test/{box_lua/fiber.test => box/fiber.test.lua} (100%) rename test/{box_lua => box}/info.result (100%) rename test/{box_lua/info.test => box/info.test.lua} (100%) rename test/{box_lua => box}/ipc.result (100%) rename test/{box_lua/ipc.test => box/ipc.test.lua} (100%) rename test/box/{iproto.test => iproto.test.py} (100%) rename test/box/{lua.test => lua.test.py} (100%) rename test/{box_lua => box}/lua_box_uuid.result (100%) rename test/{box_lua => box}/lua_box_uuid.skipcond (100%) rename test/{box_lua/lua_box_uuid.test => box/lua_box_uuid.test.lua} (100%) rename test/{box_lua => box}/lua_misc.result (100%) rename test/{box_lua/lua_misc.test => box/lua_misc.test.lua} (100%) rename test/{box_lua => box}/net.box.result (100%) rename test/{box_lua/net.box.test => box/net.box.test.lua} (100%) rename test/{box_lua => box}/net_sql.mysql.result (100%) rename test/{box_lua => box}/net_sql.mysql.skipcond (100%) rename test/{box_lua/net_sql.mysql.test => box/net_sql.mysql.test.lua} (100%) rename test/{box_lua => box}/net_sql.pg.result (100%) rename test/{box_lua => box}/net_sql.pg.skipcond (100%) rename test/{box_lua/net_sql.pg.test => box/net_sql.pg.test.lua} (100%) rename test/box/{protocol.test => protocol.test.py} (100%) rename test/box/{reconfigure.test => reconfigure.test.py} (100%) rename test/box/{session.test => session.test.py} (100%) rename test/box/{snapshot.test => snapshot.test.py} (100%) rename test/box/{socket.test => socket.test.py} (100%) rename test/box/{sql.test => sql.test.py} (100%) rename test/box/{stat.test => stat.test.py} (100%) rename test/box/{xlog.test => xlog.test.py} (100%) delete mode 100644 test/box_lua/suite.ini delete mode 100644 test/box_lua/tarantool.cfg rename test/connector_c/{connector.test => connector.test.py} (100%) rename test/connector_c/{snap.test => snap.test.py} (100%) rename test/connector_c/{tp.test => tp.test.py} (100%) rename test/connector_c/{update.test => update.test.py} (100%) rename test/connector_c/{xlog_rpl.test => xlog_rpl.test.py} (100%) rename test/memcached/{binary-get.test => binary-get.test.py} (100%) rename test/memcached/{bogus-commands.test => bogus-commands.test.py} (100%) rename test/memcached/{cas.test => cas.test.py} (98%) rename test/memcached/{expirations.test => expirations.test.py} (100%) rename test/memcached/{flags.test => flags.test.py} (100%) rename test/memcached/{flush-all.test => flush-all.test.py} (100%) rename test/memcached/{getset.test => getset.test.py} (100%) rename test/memcached/{incrdecr.test => incrdecr.test.py} (100%) rename test/memcached/{lua.test => lua.test.py} (100%) rename test/memcached/{multiversioning.test => multiversioning.test.py} (100%) rename test/memcached/{noreply.test => noreply.test.py} (100%) rename test/memcached/{off.test => off.test.py} (100%) delete mode 100644 test/python/suite.ini delete mode 100644 test/python/tarantool.cfg rename test/replication/{consistent.test => consistent.test.py} (100%) rename test/replication/{hot_standby.test => hot_standby.test.py} (100%) rename test/replication/{memcached.test => memcached.test.py} (100%) rename test/replication/{swap.test => swap.test.py} (100%) rename test/wal/{lua.test => lua.test.py} (100%) rename test/wal/{oom.test => oom.test.py} (100%) rename test/wal/{wal_mode.test => wal_mode.test.py} (100%) diff --git a/test/big/bitset.test b/test/big/bitset.test.lua similarity index 100% rename from test/big/bitset.test rename to test/big/bitset.test.lua diff --git a/test/big/hash.test b/test/big/hash.test.lua similarity index 100% rename from test/big/hash.test rename to test/big/hash.test.lua diff --git a/test/big/hash_multipart.test b/test/big/hash_multipart.test.lua similarity index 100% rename from test/big/hash_multipart.test rename to test/big/hash_multipart.test.lua diff --git a/test/big/iterator.test b/test/big/iterator.test.lua similarity index 100% rename from test/big/iterator.test rename to test/big/iterator.test.lua diff --git a/test/big/lua.test b/test/big/lua.test.lua similarity index 100% rename from test/big/lua.test rename to test/big/lua.test.lua diff --git a/test/python/sql.result b/test/big/sql.result similarity index 100% rename from test/python/sql.result rename to test/big/sql.result diff --git a/test/python/sql.test b/test/big/sql.test.py similarity index 100% rename from test/python/sql.test rename to test/big/sql.test.py diff --git a/test/big/suite.ini b/test/big/suite.ini index b1f42ac6f5..849a6c0b41 100644 --- a/test/big/suite.ini +++ b/test/big/suite.ini @@ -1,5 +1,5 @@ [default] -core = lua tarantool +core = tarantool config = tarantool.cfg -description = lua analogue of big tests +description = lua big tests lua_libs = lua/utils.lua lua/bitset.lua lua/index_random_test.lua lua/push.lua diff --git a/test/big/tree_pk.test b/test/big/tree_pk.test.lua similarity index 100% rename from test/big/tree_pk.test rename to test/big/tree_pk.test.lua diff --git a/test/big/tree_pk_multipart.test b/test/big/tree_pk_multipart.test.lua similarity index 100% rename from test/big/tree_pk_multipart.test rename to test/big/tree_pk_multipart.test.lua diff --git a/test/big/tree_variants.test b/test/big/tree_variants.test.lua similarity index 100% rename from test/big/tree_variants.test rename to test/big/tree_variants.test.lua diff --git a/test/box/admin.test b/test/box/admin.test.py similarity index 100% rename from test/box/admin.test rename to test/box/admin.test.py diff --git a/test/box_lua/admin_coredump.result b/test/box/admin_coredump.result similarity index 100% rename from test/box_lua/admin_coredump.result rename to test/box/admin_coredump.result diff --git a/test/box_lua/admin_coredump.test b/test/box/admin_coredump.test.lua similarity index 100% rename from test/box_lua/admin_coredump.test rename to test/box/admin_coredump.test.lua diff --git a/test/box/args.test b/test/box/args.test.py similarity index 100% rename from test/box/args.test rename to test/box/args.test.py diff --git a/test/box_lua/cjson.result b/test/box/cjson.result similarity index 100% rename from test/box_lua/cjson.result rename to test/box/cjson.result diff --git a/test/box_lua/cjson.test b/test/box/cjson.test.lua similarity index 100% rename from test/box_lua/cjson.test rename to test/box/cjson.test.lua diff --git a/test/box/configuration.test b/test/box/configuration.test.py similarity index 100% rename from test/box/configuration.test rename to test/box/configuration.test.py diff --git a/test/box_lua/errinj.result b/test/box/errinj.result similarity index 100% rename from test/box_lua/errinj.result rename to test/box/errinj.result diff --git a/test/box_lua/errinj.test b/test/box/errinj.test.lua similarity index 100% rename from test/box_lua/errinj.test rename to test/box/errinj.test.lua diff --git a/test/box_lua/fiber.result b/test/box/fiber.result similarity index 100% rename from test/box_lua/fiber.result rename to test/box/fiber.result diff --git a/test/box_lua/fiber.test b/test/box/fiber.test.lua similarity index 100% rename from test/box_lua/fiber.test rename to test/box/fiber.test.lua diff --git a/test/box_lua/info.result b/test/box/info.result similarity index 100% rename from test/box_lua/info.result rename to test/box/info.result diff --git a/test/box_lua/info.test b/test/box/info.test.lua similarity index 100% rename from test/box_lua/info.test rename to test/box/info.test.lua diff --git a/test/box_lua/ipc.result b/test/box/ipc.result similarity index 100% rename from test/box_lua/ipc.result rename to test/box/ipc.result diff --git a/test/box_lua/ipc.test b/test/box/ipc.test.lua similarity index 100% rename from test/box_lua/ipc.test rename to test/box/ipc.test.lua diff --git a/test/box/iproto.test b/test/box/iproto.test.py similarity index 100% rename from test/box/iproto.test rename to test/box/iproto.test.py diff --git a/test/box/lua.test b/test/box/lua.test.py similarity index 100% rename from test/box/lua.test rename to test/box/lua.test.py diff --git a/test/box_lua/lua_box_uuid.result b/test/box/lua_box_uuid.result similarity index 100% rename from test/box_lua/lua_box_uuid.result rename to test/box/lua_box_uuid.result diff --git a/test/box_lua/lua_box_uuid.skipcond b/test/box/lua_box_uuid.skipcond similarity index 100% rename from test/box_lua/lua_box_uuid.skipcond rename to test/box/lua_box_uuid.skipcond diff --git a/test/box_lua/lua_box_uuid.test b/test/box/lua_box_uuid.test.lua similarity index 100% rename from test/box_lua/lua_box_uuid.test rename to test/box/lua_box_uuid.test.lua diff --git a/test/box_lua/lua_misc.result b/test/box/lua_misc.result similarity index 100% rename from test/box_lua/lua_misc.result rename to test/box/lua_misc.result diff --git a/test/box_lua/lua_misc.test b/test/box/lua_misc.test.lua similarity index 100% rename from test/box_lua/lua_misc.test rename to test/box/lua_misc.test.lua diff --git a/test/box_lua/net.box.result b/test/box/net.box.result similarity index 100% rename from test/box_lua/net.box.result rename to test/box/net.box.result diff --git a/test/box_lua/net.box.test b/test/box/net.box.test.lua similarity index 100% rename from test/box_lua/net.box.test rename to test/box/net.box.test.lua diff --git a/test/box_lua/net_sql.mysql.result b/test/box/net_sql.mysql.result similarity index 100% rename from test/box_lua/net_sql.mysql.result rename to test/box/net_sql.mysql.result diff --git a/test/box_lua/net_sql.mysql.skipcond b/test/box/net_sql.mysql.skipcond similarity index 100% rename from test/box_lua/net_sql.mysql.skipcond rename to test/box/net_sql.mysql.skipcond diff --git a/test/box_lua/net_sql.mysql.test b/test/box/net_sql.mysql.test.lua similarity index 100% rename from test/box_lua/net_sql.mysql.test rename to test/box/net_sql.mysql.test.lua diff --git a/test/box_lua/net_sql.pg.result b/test/box/net_sql.pg.result similarity index 100% rename from test/box_lua/net_sql.pg.result rename to test/box/net_sql.pg.result diff --git a/test/box_lua/net_sql.pg.skipcond b/test/box/net_sql.pg.skipcond similarity index 100% rename from test/box_lua/net_sql.pg.skipcond rename to test/box/net_sql.pg.skipcond diff --git a/test/box_lua/net_sql.pg.test b/test/box/net_sql.pg.test.lua similarity index 100% rename from test/box_lua/net_sql.pg.test rename to test/box/net_sql.pg.test.lua diff --git a/test/box/protocol.test b/test/box/protocol.test.py similarity index 100% rename from test/box/protocol.test rename to test/box/protocol.test.py diff --git a/test/box/reconfigure.test b/test/box/reconfigure.test.py similarity index 100% rename from test/box/reconfigure.test rename to test/box/reconfigure.test.py diff --git a/test/box/session.test b/test/box/session.test.py similarity index 100% rename from test/box/session.test rename to test/box/session.test.py diff --git a/test/box/snapshot.test b/test/box/snapshot.test.py similarity index 100% rename from test/box/snapshot.test rename to test/box/snapshot.test.py diff --git a/test/box/socket.test b/test/box/socket.test.py similarity index 100% rename from test/box/socket.test rename to test/box/socket.test.py diff --git a/test/box/sql.test b/test/box/sql.test.py similarity index 100% rename from test/box/sql.test rename to test/box/sql.test.py diff --git a/test/box/stat.test b/test/box/stat.test.py similarity index 100% rename from test/box/stat.test rename to test/box/stat.test.py diff --git a/test/box/suite.ini b/test/box/suite.ini index b8ec610cd6..98726d55b7 100644 --- a/test/box/suite.ini +++ b/test/box/suite.ini @@ -1,10 +1,6 @@ [default] -core = python tarantool +core = tarantool description = tarantool/box, minimal configuration config = tarantool.cfg -# put disabled tests here -#disabled = xlog.test -# disabled = lua.test -# put disabled in valgrind test here valgrind_disabled = admin_coredump.test release_disabled = errinj.test diff --git a/test/box/xlog.test b/test/box/xlog.test.py similarity index 100% rename from test/box/xlog.test rename to test/box/xlog.test.py diff --git a/test/box_lua/suite.ini b/test/box_lua/suite.ini deleted file mode 100644 index 4c54e2e761..0000000000 --- a/test/box_lua/suite.ini +++ /dev/null @@ -1,6 +0,0 @@ -[default] -core = lua tarantool -description = tarantool/box, minimal configuration, lua tests -config = tarantool.cfg -valgrind_disabled = admin_coredump.test -release_disabled = errinj.test diff --git a/test/box_lua/tarantool.cfg b/test/box_lua/tarantool.cfg deleted file mode 100644 index 69674c64b7..0000000000 --- a/test/box_lua/tarantool.cfg +++ /dev/null @@ -1,45 +0,0 @@ -# -# Limit of memory used to store tuples to 100MB -# (0.1 GB) -# This effectively limits the memory, used by -# Tarantool. However, index and connection memory -# is stored outside the slab allocator, hence -# the effective memory usage can be higher (sometimes -# twice as high). -# -slab_alloc_arena = 0.1 - -# -# Store the pid in this file. Relative to -# startup dir. -# -pid_file = "box.pid" - -# -# Pipe the logs into the following process. -# -logger="cat - >> tarantool.log" - -# -# Read only and read-write port. -primary_port = 33013 -# Read-only port. -secondary_port = 33014 -# -# The port for administrative commands. -# -admin_port = 33015 -# -# Each write ahead log contains this many rows. -# When the limit is reached, Tarantool closes -# the WAL and starts a new one. -rows_per_wal = 50 - -# Define a simple space with 1 HASH-based -# primary key. -space[0].enabled = 1 -space[0].index[0].type = "HASH" -space[0].index[0].unique = 1 -space[0].index[0].key_field[0].fieldno = 0 -space[0].index[0].key_field[0].type = "NUM" - diff --git a/test/connector_c/connector.test b/test/connector_c/connector.test.py similarity index 100% rename from test/connector_c/connector.test rename to test/connector_c/connector.test.py diff --git a/test/connector_c/snap.test b/test/connector_c/snap.test.py similarity index 100% rename from test/connector_c/snap.test rename to test/connector_c/snap.test.py diff --git a/test/connector_c/suite.ini b/test/connector_c/suite.ini index 018e816cf3..468e565472 100644 --- a/test/connector_c/suite.ini +++ b/test/connector_c/suite.ini @@ -1,5 +1,5 @@ [default] -core = python tarantool +core = tarantool description = tarantool/box connector C config = cfg/tarantool.cfg # put disabled tests here diff --git a/test/connector_c/tp.test b/test/connector_c/tp.test.py similarity index 100% rename from test/connector_c/tp.test rename to test/connector_c/tp.test.py diff --git a/test/connector_c/update.test b/test/connector_c/update.test.py similarity index 100% rename from test/connector_c/update.test rename to test/connector_c/update.test.py diff --git a/test/connector_c/xlog_rpl.test b/test/connector_c/xlog_rpl.test.py similarity index 100% rename from test/connector_c/xlog_rpl.test rename to test/connector_c/xlog_rpl.test.py diff --git a/test/lib/admin_connection.py b/test/lib/admin_connection.py index c861a18f48..584a79d2d0 100644 --- a/test/lib/admin_connection.py +++ b/test/lib/admin_connection.py @@ -21,7 +21,9 @@ __author__ = "Konstantin Osipov <kostja.osipov@gmail.com>" # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. + import socket +import pprint import yaml import sys import re @@ -66,7 +68,8 @@ class AdminConnection(TarantoolConnection): def execute_simple(self, command, silent, lua=False): if not command: return - self.socket.sendall(('lua ' if lua else '') + command.replace('\n', ' ') + ADMIN_SEPARATOR) + cmd = ('lua ' if lua else '') + command.replace('\n', ' ') + ADMIN_SEPARATOR + self.socket.sendall(cmd) bufsiz = 4096 res = "" diff --git a/test/lib/tarantool_connection.py b/test/lib/tarantool_connection.py index 88fa0b6fe1..8fba6bb8b0 100644 --- a/test/lib/tarantool_connection.py +++ b/test/lib/tarantool_connection.py @@ -79,4 +79,5 @@ class TarantoolConnection(object): if not simple: return self.execute(command, silent) else: + self.opt_reconnect() return self.execute_simple(command, silent) diff --git a/test/lib/tarantool_server.py b/test/lib/tarantool_server.py index 17097e484a..457580e58c 100644 --- a/test/lib/tarantool_server.py +++ b/test/lib/tarantool_server.py @@ -6,6 +6,7 @@ import time import yaml import socket import signal +import shlex import shutil import pexpect import traceback @@ -428,10 +429,10 @@ class TarantoolServer(Server): def find_tests(self, test_suite, suite_path): def patterned(test, patterns): - for i in patterns - if test.name.find(i): + for i in patterns: + if test.name.find(i) != -1: return True return False - tests = [PythonTest(k, test_suite.args, test_sutie.args.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.py" ))) - tests += [PythonTest(k, test_suite.args, test_sutie.args.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.lua"))) - test_suite.tests = filter((lambda x: patterned(x)), test_suite.tests) + tests = [PythonTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.py" )))] + tests += [LuaTest(k, test_suite.args, test_suite.ini) for k in sorted(glob.glob(os.path.join(suite_path, "*.test.lua")))] + test_suite.tests = filter((lambda x: patterned(x, test_suite.args.tests)), tests) diff --git a/test/lib/test_suite.py b/test/lib/test_suite.py index 6973c56d64..76e68542fe 100644 --- a/test/lib/test_suite.py +++ b/test/lib/test_suite.py @@ -79,15 +79,16 @@ class Test: def __init__(self, name, args, suite_ini): """Initialize test properties: path to test file, path to temporary result file, path to the client program, test status.""" + rg = re.compile('.test.*') self.name = name self.args = args self.suite_ini = suite_ini - self.result = re.sub('.test*', '.result', name) - self.skip_cond = re.sub('.test*', '.skipcond', name) + self.result = rg.sub('.result', name) + self.skip_cond = rg.sub('.skipcond', name) self.tmp_result = os.path.join(self.args.vardir, os.path.basename(self.result)) self.reject = "{0}/test/{1}".format(self.args.builddir, - re.sub('.test*', '.skipcond', name)) + rg.sub('.reject', name)) self.is_executed = False self.is_executed_ok = None self.is_equal_result = None diff --git a/test/memcached/binary-get.test b/test/memcached/binary-get.test.py similarity index 100% rename from test/memcached/binary-get.test rename to test/memcached/binary-get.test.py diff --git a/test/memcached/bogus-commands.test b/test/memcached/bogus-commands.test.py similarity index 100% rename from test/memcached/bogus-commands.test rename to test/memcached/bogus-commands.test.py diff --git a/test/memcached/cas.test b/test/memcached/cas.test.py similarity index 98% rename from test/memcached/cas.test rename to test/memcached/cas.test.py index 7f299b3df1..a4fd676d55 100644 --- a/test/memcached/cas.test +++ b/test/memcached/cas.test.py @@ -82,7 +82,7 @@ print """# recv reply 'cas foo1' from memcached1 """ result = memcached1.recv(silent=True) mem1_cas_result = result.split()[0] print """# recv reply 'cas foo1' from memcached2 """ -result = memcached.recv(silent=True) +result = memcached2.recv(silent=True) mem2_cas_result = result.split()[0] if mem1_cas_result == "STORED" and mem2_cas_result == "EXISTS": diff --git a/test/memcached/expirations.test b/test/memcached/expirations.test.py similarity index 100% rename from test/memcached/expirations.test rename to test/memcached/expirations.test.py diff --git a/test/memcached/flags.test b/test/memcached/flags.test.py similarity index 100% rename from test/memcached/flags.test rename to test/memcached/flags.test.py diff --git a/test/memcached/flush-all.test b/test/memcached/flush-all.test.py similarity index 100% rename from test/memcached/flush-all.test rename to test/memcached/flush-all.test.py diff --git a/test/memcached/getset.test b/test/memcached/getset.test.py similarity index 100% rename from test/memcached/getset.test rename to test/memcached/getset.test.py diff --git a/test/memcached/incrdecr.test b/test/memcached/incrdecr.test.py similarity index 100% rename from test/memcached/incrdecr.test rename to test/memcached/incrdecr.test.py diff --git a/test/memcached/lua.test b/test/memcached/lua.test.py similarity index 100% rename from test/memcached/lua.test rename to test/memcached/lua.test.py diff --git a/test/memcached/multiversioning.test b/test/memcached/multiversioning.test.py similarity index 100% rename from test/memcached/multiversioning.test rename to test/memcached/multiversioning.test.py diff --git a/test/memcached/noreply.test b/test/memcached/noreply.test.py similarity index 100% rename from test/memcached/noreply.test rename to test/memcached/noreply.test.py diff --git a/test/memcached/off.test b/test/memcached/off.test.py similarity index 100% rename from test/memcached/off.test rename to test/memcached/off.test.py diff --git a/test/memcached/suite.ini b/test/memcached/suite.ini index ef26f4885c..3e6f37e450 100644 --- a/test/memcached/suite.ini +++ b/test/memcached/suite.ini @@ -1,5 +1,5 @@ [default] -core = python tarantool +core = tarantool description = tarantool/box memcached tests config = cfg/master.cfg disabled = cas.test diff --git a/test/python/suite.ini b/test/python/suite.ini deleted file mode 100644 index 84f40d225a..0000000000 --- a/test/python/suite.ini +++ /dev/null @@ -1,9 +0,0 @@ -[default] -core = python tarantool -description = tarantool/box, various namespace configurations and properties -config = tarantool.cfg -# put disabled tests here -# disabled = lua.test -# put disabled in valgrind test here -#valgrind_disabled = ... -release_disabled = hash_errinj.test diff --git a/test/python/tarantool.cfg b/test/python/tarantool.cfg deleted file mode 100644 index 58def14511..0000000000 --- a/test/python/tarantool.cfg +++ /dev/null @@ -1,396 +0,0 @@ -slab_alloc_arena = 0.1 - -pid_file = "box.pid" - -logger="cat - >> tarantool.log" - -primary_port = 33013 -secondary_port = 33014 -admin_port = 33015 - -rows_per_wal = 50 - -space[0].enabled = 1 -space[0].index[0].type = "HASH" -space[0].index[0].unique = 1 -space[0].index[0].key_field[0].fieldno = 0 -space[0].index[0].key_field[0].type = "STR" -space[0].index[1].type = "TREE" -space[0].index[1].unique = 0 -space[0].index[1].key_field[0].fieldno = 1 -space[0].index[1].key_field[0].type = "STR" - -space[1].enabled = 1 -space[1].index[0].type = "HASH" -space[1].index[0].unique = 1 -space[1].index[0].key_field[0].fieldno = 0 -space[1].index[0].key_field[0].type = "STR" -space[1].index[1].type = "TREE" -space[1].index[1].unique = 1 -space[1].index[1].key_field[0].fieldno = 1 -space[1].index[1].key_field[0].type = "STR" -space[1].index[1].key_field[1].fieldno = 2 -space[1].index[1].key_field[1].type = "STR" - -space[2].enabled = 1 -space[2].index[0].type = "TREE" -space[2].index[0].unique = 1 -space[2].index[0].key_field[0].fieldno = 0 -space[2].index[0].key_field[0].type = "NUM" - -space[3].enabled = 1 -space[3].index[0].type = "TREE" -space[3].index[0].unique = 1 -space[3].index[0].key_field[0].fieldno = 0 -space[3].index[0].key_field[0].type = "STR" - -space[4].enabled = 1 -space[4].index[0].type = "HASH" -space[4].index[0].unique = 1 -space[4].index[0].key_field[0].fieldno = 0 -space[4].index[0].key_field[0].type = "STR" -space[4].index[1].type = "TREE" -space[4].index[1].unique = 0 -space[4].index[1].key_field[0].fieldno = 1 -space[4].index[1].key_field[0].type = "STR" - -space[5].enabled = 1 -space[5].index[0].type = "TREE" -space[5].index[0].unique = 1 -space[5].index[0].key_field[0].fieldno = 0 -space[5].index[0].key_field[0].type = "NUM64" -space[5].index[1].type = "TREE" -space[5].index[1].unique = 0 -space[5].index[1].key_field[0].fieldno = 1 -space[5].index[1].key_field[0].type = "STR" -space[5].index[1].key_field[1].fieldno = 2 -space[5].index[1].key_field[1].type = "STR" - - -# -# Tree index variants -# -# Tuple fields: -# -# 0: NUM, 1: NUM64, 2: NUM64, 3: STR, 4: STR, 5: STR, 6: STR, 7: *, 8: NUM -# - -space[6].enabled = 1 - -space[6].index[0].type = "TREE" -space[6].index[0].unique = 1 -space[6].index[0].key_field[0].fieldno = 0 -space[6].index[0].key_field[0].type = "NUM" - -space[6].index[1].type = "TREE" -space[6].index[1].unique = 1 -space[6].index[1].key_field[0].fieldno = 1 -space[6].index[1].key_field[0].type = "NUM64" - -space[6].index[2].type = "TREE" -space[6].index[2].unique = 0 -space[6].index[2].key_field[0].fieldno = 2 -space[6].index[2].key_field[0].type = "NUM64" - -space[6].index[3].type = "TREE" -space[6].index[3].unique = 0 -space[6].index[3].key_field[0].fieldno = 3 -space[6].index[3].key_field[0].type = "STR" -space[6].index[3].key_field[1].fieldno = 4 -space[6].index[3].key_field[1].type = "STR" - -space[6].index[4].type = "TREE" -space[6].index[4].unique = 0 -space[6].index[4].key_field[0].fieldno = 6 -space[6].index[4].key_field[0].type = "STR" -space[6].index[4].key_field[1].fieldno = 5 -space[6].index[4].key_field[1].type = "STR" - -space[6].index[5].type = "TREE" -space[6].index[5].unique = 0 -space[6].index[5].key_field[0].fieldno = 8 -space[6].index[5].key_field[0].type = "NUM" - -space[6].index[6].type = "TREE" -space[6].index[6].unique = 1 -space[6].index[6].key_field[0].fieldno = 6 -space[6].index[6].key_field[0].type = "STR" -space[6].index[6].key_field[1].fieldno = 5 -space[6].index[6].key_field[1].type = "STR" -space[6].index[6].key_field[2].fieldno = 3 -space[6].index[6].key_field[2].type = "STR" -space[6].index[6].key_field[3].fieldno = 4 -space[6].index[6].key_field[3].type = "STR" -space[6].index[6].key_field[4].fieldno = 8 -space[6].index[6].key_field[4].type = "NUM" - -# Space #7, https://bugs.launchpad.net/tarantool/+bug/929654 -space[7].enabled = true - -space[7].index[0].type = "HASH" -space[7].index[0].unique = true -space[7].index[0].key_field[0].fieldno = 0 -space[7].index[0].key_field[0].type = "NUM" - -space[7].index[1].type = "HASH" -space[7].index[1].unique = true -space[7].index[1].key_field[0].fieldno = 1 -space[7].index[1].key_field[0].type = "STR" - -# Lua 64bit numbers -space[8].enabled = true -space[8].index[0].type = "TREE" -space[8].index[0].unique = 1 -space[8].index[0].key_field[0].fieldno = 0 -space[8].index[0].key_field[0].type = "NUM64" - - -space[9].enabled = true -# Multipart primary key (sender nickname, receiver nickname, message id) -space[9].index[0].type = "TREE" -space[9].index[0].unique = 1 -# Sender user nickname -space[9].index[0].key_field[0].fieldno = 0 -space[9].index[0].key_field[0].type = "STR" -# Receiver user nickname -space[9].index[0].key_field[1].fieldno = 1 -space[9].index[0].key_field[1].type = "STR" -# Message id -space[9].index[0].key_field[2].fieldno = 2 -space[9].index[0].key_field[2].type = "NUM" - -# First space for hash_i32 tests -space[10].enabled = 1 -space[10].index[0].type = "HASH" -space[10].index[0].unique = 1 -space[10].index[0].key_field[0].fieldno = 0 -space[10].index[0].key_field[0].type = "NUM" - -# Second space for hash_i64 tests -space[11].enabled = 1 -space[11].index[0].type = "HASH" -space[11].index[0].unique = 1 -space[11].index[0].key_field[0].fieldno = 0 -space[11].index[0].key_field[0].type = "NUM64" - -# First space for hash_str tests -space[12].enabled = 1 -space[12].index[0].type = "HASH" -space[12].index[0].unique = 1 -space[12].index[0].key_field[0].fieldno = 0 -space[12].index[0].key_field[0].type = "STR" - -# lua select_reverse_range() testing -# https://blueprints.launchpad.net/tarantool/+spec/backward-tree-index-iterator -space[14].enabled = true -space[14].index[0].type = "TREE" -space[14].index[0].unique = 1 -space[14].index[0].key_field[0].fieldno = 0 -space[14].index[0].key_field[0].type = "NUM" -space[14].index[1].type = "TREE" -space[14].index[1].unique = 1 -space[14].index[1].key_field[0].fieldno = 1 -space[14].index[1].key_field[0].type = "NUM" -space[14].index[1].key_field[1].fieldno = 0 -space[14].index[1].key_field[1].type = "NUM" - -space[15].enabled = true -space[15].index[0].type = "TREE" -space[15].index[0].unique = true -space[15].index[0].key_field[0].fieldno = 0 -space[15].index[0].key_field[0].type = "STR" - -# Tests for box.index iterators (old) -space[16].enabled = true -space[16].index[0].type = "TREE" -space[16].index[0].unique = 1 -space[16].index[0].key_field[0].fieldno = 0 -space[16].index[0].key_field[0].type = "STR" -space[16].index[1].type = "TREE" -space[16].index[1].unique = 1 -space[16].index[1].key_field[0].fieldno = 1 -space[16].index[1].key_field[0].type = "STR" -space[16].index[1].key_field[1].fieldno = 2 -space[16].index[1].key_field[1].type = "STR" - -# lua index.idx:count() testing -# https://blueprints.launchpad.net/tarantool/+spec/lua-builtin-size-of-subtree -space[17].enabled = true -space[17].index[0].type = "HASH" -space[17].index[0].unique = 1 -space[17].index[0].key_field[0].fieldno = 0 -space[17].index[0].key_field[0].type = "NUM" -space[17].index[1].type = "TREE" -space[17].index[1].unique = 0 -space[17].index[1].key_field[0].fieldno = 1 -space[17].index[1].key_field[0].type = "NUM" -space[17].index[1].key_field[1].fieldno = 2 -space[17].index[1].key_field[1].type = "NUM" - -# lua box.auto_increment() testing -# http://bugs.launchpad.net/tarantool/+bug/1006354 -space[18].enabled = 1 -space[18].index[0].type = "TREE" -space[18].index[0].unique = 1 -space[18].index[0].key_field[0].fieldno = 0 -space[18].index[0].key_field[0].type = "NUM" - -# Space #19, https://bugs.launchpad.net/tarantool/+bug/1082356 -space[19].enabled = 1 -space[19].index[0].type = "TREE" -space[19].index[0].unique = 1 -space[19].index[0].key_field[0].fieldno = 0 -space[19].index[0].key_field[0].type = "NUM" -space[19].index[0].key_field[1].fieldno = 2 -space[19].index[0].key_field[1].type = "NUM" - -# -# Tests for box.index iterators (new) -# - -# Tree single-part unique -space[20].enabled = true -space[20].index[0].type = "TREE" -space[20].index[0].unique = 1 -space[20].index[0].key_field[0].fieldno = 0 -space[20].index[0].key_field[0].type = "STR" - -# Tree single-part non-unique -space[20].index[1].type = "TREE" -space[20].index[1].unique = 0 -space[20].index[1].key_field[0].fieldno = 1 -space[20].index[1].key_field[0].type = "STR" - -# Tree multi-part unique -space[20].index[2].type = "TREE" -space[20].index[2].unique = 1 -space[20].index[2].key_field[0].fieldno = 1 -space[20].index[2].key_field[0].type = "STR" -space[20].index[2].key_field[1].fieldno = 2 -space[20].index[2].key_field[1].type = "STR" - -# Tree multi-part non-unique -space[20].index[3].type = "TREE" -space[20].index[3].unique = 0 -space[20].index[3].key_field[0].fieldno = 2 -space[20].index[3].key_field[0].type = "STR" -space[20].index[3].key_field[1].fieldno = 3 -space[20].index[3].key_field[1].type = "STR" - -# Hash single-part unique -space[20].index[4].type = "HASH" -space[20].index[4].unique = 1 -space[20].index[4].key_field[0].fieldno = 0 -space[20].index[4].key_field[0].type = "STR" - -# Hash multi-part unique -space[20].index[5].type = "HASH" -space[20].index[5].unique = 1 -space[20].index[5].key_field[0].fieldno = 1 -space[20].index[5].key_field[0].type = "STR" -space[20].index[5].key_field[1].fieldno = 2 -space[20].index[5].key_field[1].type = "STR" - -# hash::replace -space[21].enabled = true - -space[21].index[0].type = "HASH" -space[21].index[0].unique = true -space[21].index[0].key_field[0].fieldno = 0 -space[21].index[0].key_field[0].type = "NUM" - -space[21].index[1].type = "HASH" -space[21].index[1].unique = true -space[21].index[1].key_field[0].fieldno = 1 -space[21].index[1].key_field[0].type = "NUM" - -space[21].index[2].type = "HASH" -space[21].index[2].unique = true -space[21].index[2].key_field[0].fieldno = 2 -space[21].index[2].key_field[0].type = "NUM" - -space[21].index[3].type = "HASH" -space[21].index[3].unique = true -space[21].index[3].key_field[0].fieldno = 3 -space[21].index[3].key_field[0].type = "NUM" - -# tree::replace test -space[22].enabled = true - -space[22].index[0].type = "TREE" -space[22].index[0].unique = true -space[22].index[0].key_field[0].fieldno = 0 -space[22].index[0].key_field[0].type = "NUM" - -space[22].index[1].type = "TREE" -space[22].index[1].unique = true -space[22].index[1].key_field[0].fieldno = 1 -space[22].index[1].key_field[0].type = "NUM" - -space[22].index[2].type = "TREE" -space[22].index[2].unique = false -space[22].index[2].key_field[0].fieldno = 2 -space[22].index[2].key_field[0].type = "NUM" - -space[22].index[3].type = "TREE" -space[22].index[3].unique = true -space[22].index[3].key_field[0].fieldno = 3 -space[22].index[3].key_field[0].type = "NUM" - -# Space #23, https://bugs.launchpad.net/tarantool/+bug/1042798 -space[23].enabled = 1 -space[23].index[0].type = "TREE" -space[23].index[0].unique = 1 -space[23].index[0].key_field[0].fieldno = 2 -space[23].index[0].key_field[0].type = "NUM" -space[23].index[0].key_field[1].fieldno = 1 -space[23].index[0].key_field[1].type = "NUM" - -# bitset::replace test -space[24].enabled = true -space[24].index[0].type = "HASH" -space[24].index[0].unique = true -space[24].index[0].key_field[0].fieldno = 0 -space[24].index[0].key_field[0].type = "NUM" - -space[24].index[1].type = "BITSET" -space[24].index[1].unique = false -space[24].index[1].key_field[0].fieldno = 1 -space[24].index[1].key_field[0].type = "NUM" - -# lua box.auto_increment() with NUM64 keys testing -space[25].enabled = 1 -space[25].index[0].type = "TREE" -space[25].index[0].unique = 1 -space[25].index[0].key_field[0].fieldno = 0 -space[25].index[0].key_field[0].type = "NUM64" -# index:random test -space[26].enabled = true -space[26].index[0].type = "TREE" -space[26].index[0].unique = true -space[26].index[0].key_field[0].fieldno = 0 -space[26].index[0].key_field[0].type = "NUM" - -space[26].index[1].type = "HASH" -space[26].index[1].unique = true -space[26].index[1].key_field[0].fieldno = 0 -space[26].index[1].key_field[0].type = "NUM" - -# Multi-part hash -space[27].enabled = 1 - -space[27].index[0].type = HASH -space[27].index[0].unique = 1 -space[27].index[0].key_field[0].fieldno = 0 -space[27].index[0].key_field[0].type = NUM -space[27].index[0].key_field[1].fieldno = 1 -space[27].index[0].key_field[1].type = STR -space[27].index[0].key_field[2].fieldno = 2 -space[27].index[0].key_field[2].type = NUM - -space[27].index[1].type = HASH -space[27].index[1].unique = 1 -space[27].index[1].key_field[0].fieldno = 2 -space[27].index[1].key_field[0].type = NUM -space[27].index[1].key_field[1].fieldno = 4 -space[27].index[1].key_field[1].type = NUM diff --git a/test/replication/consistent.test b/test/replication/consistent.test.py similarity index 100% rename from test/replication/consistent.test rename to test/replication/consistent.test.py diff --git a/test/replication/hot_standby.test b/test/replication/hot_standby.test.py similarity index 100% rename from test/replication/hot_standby.test rename to test/replication/hot_standby.test.py diff --git a/test/replication/memcached.test b/test/replication/memcached.test.py similarity index 100% rename from test/replication/memcached.test rename to test/replication/memcached.test.py diff --git a/test/replication/suite.ini b/test/replication/suite.ini index 7adfbc2352..f81ca33b87 100644 --- a/test/replication/suite.ini +++ b/test/replication/suite.ini @@ -1,6 +1,4 @@ [default] -core = python tarantool +core = tarantool description = tarantool/box, replication config = cfg/master.cfg -# put disabled in valgrind test here -#valgrind_disabled = ... diff --git a/test/replication/swap.test b/test/replication/swap.test.py similarity index 100% rename from test/replication/swap.test rename to test/replication/swap.test.py diff --git a/test/wal/lua.test b/test/wal/lua.test.py similarity index 100% rename from test/wal/lua.test rename to test/wal/lua.test.py diff --git a/test/wal/oom.test b/test/wal/oom.test.py similarity index 100% rename from test/wal/oom.test rename to test/wal/oom.test.py diff --git a/test/wal/suite.ini b/test/wal/suite.ini index ceb5086273..1f3ec2c0d5 100644 --- a/test/wal/suite.ini +++ b/test/wal/suite.ini @@ -1,5 +1,5 @@ [default] -core = python tarantool +core = tarantool description = tarantool/box, wal_mode = none config = tarantool.cfg # put disabled tests here diff --git a/test/wal/wal_mode.test b/test/wal/wal_mode.test.py similarity index 100% rename from test/wal/wal_mode.test rename to test/wal/wal_mode.test.py -- GitLab