diff --git a/.gitmodules b/.gitmodules index e58ad745..006735f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,3 @@ [submodule "lib/tarantool-python"] path = lib/tarantool-python url = https://github.com/tarantool/tarantool-python.git -[submodule "lib/checks"] - path = lib/checks - url = https://github.com/tarantool/checks.git -[submodule "lib/luatest"] - path = lib/luatest - url = https://github.com/tarantool/luatest.git diff --git a/.luacheckrc b/.luacheckrc index 575bfce2..bd85e46c 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -27,6 +27,4 @@ include_files = { exclude_files = { "lib/tarantool-python", "test/test-tarantool/*.test.lua", - "lib/luatest/**", - "lib/checks/**", } diff --git a/lib/__init__.py b/lib/__init__.py index 1c476095..c2945532 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -63,25 +63,25 @@ def module_init(): pass args.builddir = os.path.abspath(os.path.expanduser(args.builddir)) + args.luatestdir = os.path.abspath(os.path.expanduser(args.luatestdir)) SOURCEDIR = os.path.dirname(os.getcwd()) BUILDDIR = args.builddir + LUATESTDIR = args.luatestdir os.environ["SOURCEDIR"] = SOURCEDIR os.environ["BUILDDIR"] = BUILDDIR soext = sys.platform == 'darwin' and 'dylib' or 'so' os.environ['LUA_PATH'] = ( SOURCEDIR + '/?.lua;' + SOURCEDIR + '/?/init.lua;' - + os.environ['TEST_RUN_DIR'] + '/lib/checks/?.lua;' - + os.environ['TEST_RUN_DIR'] + '/lib/luatest/?/init.lua;' - + os.environ['TEST_RUN_DIR'] + '/lib/luatest/?.lua;;' + + LUATESTDIR + '/?/init.lua;' + LUATESTDIR + '/?.lua;;' ) os.environ["LUA_CPATH"] = BUILDDIR+"/?."+soext+";;" os.environ["REPLICATION_SYNC_TIMEOUT"] = str(args.replication_sync_timeout) os.environ['MEMTX_ALLOCATOR'] = args.memtx_allocator - prepend_path(os.path.join(os.environ['TEST_RUN_DIR'], 'lib/luatest/bin')) + prepend_path(os.path.join(LUATESTDIR, 'bin')) TarantoolServer.find_exe(args.builddir, executable=args.executable) UnittestServer.find_exe(args.builddir) diff --git a/lib/checks b/lib/checks deleted file mode 160000 index c97888c8..00000000 --- a/lib/checks +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c97888c8d4a5ffb0255267d2d82fd60bae17916a diff --git a/lib/luatest b/lib/luatest deleted file mode 160000 index b4461209..00000000 --- a/lib/luatest +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b44612090a33cf7e8ea56af897ebc89e50380589 diff --git a/lib/luatest_server.py b/lib/luatest_server.py index c128b4f4..22890398 100644 --- a/lib/luatest_server.py +++ b/lib/luatest_server.py @@ -125,7 +125,7 @@ def find_exe(cls, builddir): cls.binary = TarantoolServer.binary cls.debug = bool(re.findall(r'^Target:.*-Debug$', str(cls.version()), re.M)) - cls.luatest = os.environ['TEST_RUN_DIR'] + '/lib/luatest/bin/luatest' + cls.luatest = os.path.join(Options().args.luatestdir, 'bin/luatest') @classmethod def verify_luatest_exe(cls): diff --git a/lib/options.py b/lib/options.py index 12021b35..a06b30f0 100644 --- a/lib/options.py +++ b/lib/options.py @@ -228,6 +228,21 @@ def __init__(self): Default: false. """)) + parser.add_argument( + "--luatestdir", + dest="luatestdir", + default="../third_party/luatest", + help=format_help( + """ + Path to luatest directory. + + Beware: A relative path is resolved against the directory, + where all tests reside. **NOT** a current directory of a + parent shell. + + Default: ../third_party/luatest + """)) + parser.add_argument( "--builddir", dest="builddir",