Skip to content

Remove luatest submodule (v2) #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
github.event.pull_request.head.repo.full_name != github.repository ) &&
( github.repository == 'tarantool/test-run' )

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
tarantool-version: ['2.8', '2.10', '2.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
tarantool-version: ['2.10', '2.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -31,11 +31,15 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: display python version
run: python -c "import sys; print(sys.version)"
- name: setup tt
run: |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
sudo apt install -y tt
tt version
- name: setup dependencies
run: |
sudo apt update -y
sudo apt-get -y install lua5.1 luarocks
sudo luarocks install luacheck
tt rocks install luatest
tt rocks install luacheck
- name: setup python dependencies
run: |
pip install -r requirements.txt
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ include_files = {
exclude_files = {
"lib/tarantool-python",
"test/test-tarantool/*.test.lua",
"lib/luatest/**",
"lib/checks/**",
".rocks/**/*.lua",
}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export PATH := .rocks/bin:$(PATH)

MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
TEST_RUN_EXTRA_PARAMS?=
Expand Down
20 changes: 20 additions & 0 deletions bin/luatest
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env tarantool

--
-- Add the luatest module to LUA_PATH so that it can be used in processes
-- spawned by tests.
--
local fio = require('fio')
local path = package.search('luatest')
if path == nil then
error('luatest not found')
end
path = fio.dirname(path) -- strip init.lua
path = fio.dirname(path) -- strip luatest
os.setenv('LUA_PATH',
path .. '/?.lua;' .. path .. '/?/init.lua;' ..
(os.getenv('LUA_PATH') or ';'))

print(('Tarantool version is %s'):format(require('tarantool').version))

require('luatest.cli_entrypoint')()
10 changes: 2 additions & 8 deletions lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,12 @@ def module_init():
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;;'
)

os.environ["LUA_PATH"] = SOURCEDIR+"/?.lua;"+SOURCEDIR+"/?/init.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(os.environ['TEST_RUN_DIR'], 'bin'))

TarantoolServer.find_exe(args.builddir, executable=args.executable)
UnittestServer.find_exe(args.builddir)
Expand Down
1 change: 0 additions & 1 deletion lib/checks
Submodule checks deleted from c97888
1 change: 0 additions & 1 deletion lib/luatest
Submodule luatest deleted from b44612
2 changes: 1 addition & 1 deletion lib/luatest_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.environ['TEST_RUN_DIR'] + '/bin/luatest'

@classmethod
def verify_luatest_exe(cls):
Expand Down
Loading