Skip to content

Commit 09ab978

Browse files
committed
Remove luatest and checks submodules
The `test-run` project is rarely updated these days while `luatest` is rapidly developing. Let's remove the `luatest` submodule from `test-run` to ease luatest bumps in projects using `test-run`. Now, `luatest` is supposed to be added as a submodule to all projects using `test-run`. By default, `test-run` looks for `luatest` in `../third_party/luatest`, but this can be overridden with the new `--luatestdir option`. Note that we also remove the `checks` submodule, which was added as a dependency of `luatest`. It was built in Tarantool in 2.11.0 so there's no need in it anymore. Closes #453
1 parent 95bbee5 commit 09ab978

File tree

7 files changed

+20
-15
lines changed

7 files changed

+20
-15
lines changed

.gitmodules

-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@
44
[submodule "lib/tarantool-python"]
55
path = lib/tarantool-python
66
url = https://github.com/tarantool/tarantool-python.git
7-
[submodule "lib/checks"]
8-
path = lib/checks
9-
url = https://github.com/tarantool/checks.git
10-
[submodule "lib/luatest"]
11-
path = lib/luatest
12-
url = https://github.com/tarantool/luatest.git

.luacheckrc

-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@ include_files = {
2727
exclude_files = {
2828
"lib/tarantool-python",
2929
"test/test-tarantool/*.test.lua",
30-
"lib/luatest/**",
31-
"lib/checks/**",
3230
}

lib/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,25 @@ def module_init():
6363
pass
6464

6565
args.builddir = os.path.abspath(os.path.expanduser(args.builddir))
66+
args.luatestdir = os.path.abspath(os.path.expanduser(args.luatestdir))
6667

6768
SOURCEDIR = os.path.dirname(os.getcwd())
6869
BUILDDIR = args.builddir
70+
LUATESTDIR = args.luatestdir
6971
os.environ["SOURCEDIR"] = SOURCEDIR
7072
os.environ["BUILDDIR"] = BUILDDIR
7173
soext = sys.platform == 'darwin' and 'dylib' or 'so'
7274

7375
os.environ['LUA_PATH'] = (
7476
SOURCEDIR + '/?.lua;' + SOURCEDIR + '/?/init.lua;'
75-
+ os.environ['TEST_RUN_DIR'] + '/lib/checks/?.lua;'
76-
+ os.environ['TEST_RUN_DIR'] + '/lib/luatest/?/init.lua;'
77-
+ os.environ['TEST_RUN_DIR'] + '/lib/luatest/?.lua;;'
77+
+ LUATESTDIR + '/?/init.lua;' + LUATESTDIR + '/?.lua;;'
7878
)
7979

8080
os.environ["LUA_CPATH"] = BUILDDIR+"/?."+soext+";;"
8181
os.environ["REPLICATION_SYNC_TIMEOUT"] = str(args.replication_sync_timeout)
8282
os.environ['MEMTX_ALLOCATOR'] = args.memtx_allocator
8383

84-
prepend_path(os.path.join(os.environ['TEST_RUN_DIR'], 'lib/luatest/bin'))
84+
prepend_path(os.path.join(LUATESTDIR, 'bin'))
8585

8686
TarantoolServer.find_exe(args.builddir, executable=args.executable)
8787
UnittestServer.find_exe(args.builddir)

lib/checks

-1
This file was deleted.

lib/luatest

-1
This file was deleted.

lib/luatest_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def find_exe(cls, builddir):
125125
cls.binary = TarantoolServer.binary
126126
cls.debug = bool(re.findall(r'^Target:.*-Debug$', str(cls.version()),
127127
re.M))
128-
cls.luatest = os.environ['TEST_RUN_DIR'] + '/lib/luatest/bin/luatest'
128+
cls.luatest = os.path.join(Options().args.luatestdir, 'bin/luatest')
129129

130130
@classmethod
131131
def verify_luatest_exe(cls):

lib/options.py

+15
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,21 @@ def __init__(self):
228228
Default: false.
229229
"""))
230230

231+
parser.add_argument(
232+
"--luatestdir",
233+
dest="luatestdir",
234+
default="../third_party/luatest",
235+
help=format_help(
236+
"""
237+
Path to luatest directory.
238+
239+
Beware: A relative path is resolved against the directory,
240+
where all tests reside. **NOT** a current directory of a
241+
parent shell.
242+
243+
Default: ../third_party/luatest
244+
"""))
245+
231246
parser.add_argument(
232247
"--builddir",
233248
dest="builddir",

0 commit comments

Comments
 (0)