Skip to content

Commit ce9a3ae

Browse files
committed
Remove luatest submodule
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 installed from rocks. Closes #453
1 parent de9bd5c commit ce9a3ae

File tree

9 files changed

+17
-23
lines changed

9 files changed

+17
-23
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: display python version
3333
run: python -c "import sys; print(sys.version)"
34+
- name: setup tt
35+
run: |
36+
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
37+
sudo apt install -y tt
38+
tt version
3439
- name: setup dependencies
3540
run: |
36-
sudo apt update -y
37-
sudo apt-get -y install lua5.1 luarocks
38-
sudo luarocks install luacheck
41+
tt rocks install luatest
42+
tt rocks install luacheck
3943
- name: setup python dependencies
4044
run: |
4145
pip install -r requirements.txt

.gitmodules

Lines changed: 0 additions & 6 deletions
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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ include_files = {
2727
exclude_files = {
2828
"lib/tarantool-python",
2929
"test/test-tarantool/*.test.lua",
30-
"lib/luatest/**",
31-
"lib/checks/**",
30+
".rocks/**/*.lua",
3231
}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ flake8:
1212
$(PYTHON) -m flake8 *.py lib/*.py
1313

1414
luacheck:
15-
luacheck --config .luacheckrc .
15+
.rocks/bin/luacheck --config .luacheckrc .
1616

1717
test_integration:
1818
PYTHONPATH=$(PROJECT_DIR) $(PYTHON) test/test-run.py --force --exclude unittest $(TEST_RUN_EXTRA_PARAMS)

bin/luatest

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env tarantool
2+
3+
print(('Tarantool version is %s'):format(require('tarantool').version))
4+
5+
require('luatest.cli_entrypoint')()

lib/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,12 @@ def module_init():
7070
os.environ["BUILDDIR"] = BUILDDIR
7171
soext = sys.platform == 'darwin' and 'dylib' or 'so'
7272

73-
os.environ['LUA_PATH'] = (
74-
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;;'
78-
)
79-
73+
os.environ["LUA_PATH"] = SOURCEDIR+"/?.lua;"+SOURCEDIR+"/?/init.lua;;"
8074
os.environ["LUA_CPATH"] = BUILDDIR+"/?."+soext+";;"
8175
os.environ["REPLICATION_SYNC_TIMEOUT"] = str(args.replication_sync_timeout)
8276
os.environ['MEMTX_ALLOCATOR'] = args.memtx_allocator
8377

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

8680
TarantoolServer.find_exe(args.builddir, executable=args.executable)
8781
UnittestServer.find_exe(args.builddir)

lib/checks

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/luatest

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/luatest_server.py

Lines changed: 1 addition & 1 deletion
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.environ['TEST_RUN_DIR'] + '/bin/luatest'
129129

130130
@classmethod
131131
def verify_luatest_exe(cls):

0 commit comments

Comments
 (0)