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 b1f42ac6f53121cf6fbbb0e37088e96199e93858..849a6c0b41c8a58b61465f3e42b83d4e98176811 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 b8ec610cd69dc88f31363833b0a76e923e79d4dd..98726d55b793444a0dc88001683e4897953fc1b8 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 4c54e2e76135d98834d5129100153909af479687..0000000000000000000000000000000000000000 --- 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 69674c64b7d329793e659c8864ed222f23a9eccf..0000000000000000000000000000000000000000 --- 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 018e816cf351135f7474dcd7c638f579d514c6bd..468e565472e47f375137538a452f30a064e0f57d 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 c861a18f48c1612279226185b5d7eb182ad94a88..0c8c34b040231244ce54bdf1aa9ba3932d756c93 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 = "" @@ -94,3 +97,10 @@ class AdminConnection(TarantoolConnection): if (not rg1 or len(rg1.group()) != len(command)) and not rg2: add_lua=True return self.execute_simple(command, silent, lua=add_lua) + + def __call__(self, command, silent=False, simple=False): + if not simple: + return self.execute(command, silent) + else: + self.opt_reconnect() + return self.execute_simple(command, silent) diff --git a/test/lib/lua_tarantool_server.py b/test/lib/lua_tarantool_server.py deleted file mode 100644 index 7e181fdf4e1a9704cde979266479a82e5168a9a7..0000000000000000000000000000000000000000 --- a/test/lib/lua_tarantool_server.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -import sys -import glob - -from server import Server -from test_suite import Test -from tarantool_server import TarantoolServer, FuncTest - -class LuaTest(FuncTest): - def execute(self, server): - for i in open(self.name, 'r').read().replace('\n\n', '\n').split(';\n'): - server.admin(i) - -class LuaTarantoolServer(TarantoolServer): - def __new__(cls, core="lua tarantool"): - return TarantoolServer.__new__(cls) - - def __init__(self, core="lua tarantool"): - TarantoolServer.__init__(self, core) - - def find_tests(self, test_suite, suite_path): - for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test"))): - for test_pattern in test_suite.args.tests: - if test_name.find(test_pattern) != -1: - test_suite.tests.append(LuaTest(test_name, test_suite.args, test_suite.ini)) - diff --git a/test/lib/python_tarantool_server.py b/test/lib/python_tarantool_server.py deleted file mode 100644 index cba5333653ba5a08f2e11ca8c7e7ccdc0bf2c0d3..0000000000000000000000000000000000000000 --- a/test/lib/python_tarantool_server.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import sys -import glob - -from server import Server -from test_suite import Test -from tarantool_server import TarantoolServer, FuncTest - -class PythonTest(FuncTest): - def execute(self, server): - execfile(self.name, dict(locals(), **server.__dict__)) - -class PythonTarantoolServer(TarantoolServer): - def __new__(cls, core="python tarantool"): - return TarantoolServer.__new__(cls) - - def __init__(self, core="python tarantool"): - TarantoolServer.__init__(self, core) - - def find_tests(self, test_suite, suite_path): - for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test"))): - for test_pattern in test_suite.args.tests: - if test_name.find(test_pattern) != -1: - test_suite.tests.append(PythonTest(test_name, test_suite.args, test_suite.ini)) - diff --git a/test/lib/tarantool_connection.py b/test/lib/tarantool_connection.py index 88fa0b6fe1d3d6fc684beaf708dc8caebf3b82cf..e05ee6baba50ce489a326cda2f0e7a3be7aaede2 100644 --- a/test/lib/tarantool_connection.py +++ b/test/lib/tarantool_connection.py @@ -76,7 +76,4 @@ class TarantoolConnection(object): self.disconnect() def __call__(self, command, silent=False, simple=False): - if not simple: - return self.execute(command, silent) - else: - return self.execute_simple(command, silent) + return self.execute(command, silent) diff --git a/test/lib/tarantool_server.py b/test/lib/tarantool_server.py index 5ec22b22cf9dd24e1514df7cd444e42018e503b2..a35e673cff7a47c92720394a633b042087f27771 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 @@ -51,6 +52,15 @@ class FuncTest(Test): def execute(self, server): execfile(self.name, dict(locals(), **server.__dict__)) +class LuaTest(FuncTest): + def execute(self, server): + for i in open(self.name, 'r').read().replace('\n\n', '\n').split(';\n'): + server.admin(i) + +class PythonTest(FuncTest): + def execute(self, server): + execfile(self.name, dict(locals(), **server.__dict__)) + class TarantoolConfigFile: """ConfigParser can't read files without sections, work it around""" def __init__(self, fp, section_name): @@ -419,3 +429,12 @@ class TarantoolServer(Server): except socket.error as e: break + def find_tests(self, test_suite, suite_path): + def patterned(test, patterns): + for i in patterns: + if test.name.find(i) != -1: + return True + return False + 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 e1f0b9d12617a3d8a84fbf3f75ff85f9dd3b2cfd..76e68542fec91a1641d98e6d0c653ebed769fd12 100644 --- a/test/lib/test_suite.py +++ b/test/lib/test_suite.py @@ -1,5 +1,5 @@ import os -import os.path +import re import sys import stat import glob @@ -78,17 +78,17 @@ 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.""" - + 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 = name.replace(".test", ".result") - self.skip_cond = name.replace(".test", ".skipcond") + 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, - name.replace(".test", ".reject")) + 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 7f299b3df19206c8f4cc1cd0eaa3d55396de5334..a4fd676d5567de65b4148f4dae939c63de335997 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 ef26f4885c102f830f864d06a8281f8d066abdf4..3e6f37e4504f610103cd6acf93f661504b409858 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 84f40d225a1988aba3e60b450918429f4290f4db..0000000000000000000000000000000000000000 --- 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 58def14511efd800f7beeb9f97ac5e19329b1e7d..0000000000000000000000000000000000000000 --- 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 7adfbc2352f728d25d8cfb351b5281cf39f99dc1..f81ca33b878efd5511d69107b74d0dfc97d57fdb 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 ceb5086273c431c4fd5297ac968646339f66cb60..1f3ec2c0d501ecc91d102474718646f30538231a 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