tarantool / test-run

Tarantool functional testing framework
14 stars 15 forks source link

Migrate tarantoolctl from the tarantool repository #401

Closed ochaplashkin closed 1 year ago

ochaplashkin commented 1 year ago

What's the problem?

In the near future we plan to test Tarantool installed from a DEB/RPM package. Since 3.0.0-alpha1 release ^1 Tarantool packages don't have the tarantoolctl utility inside ^2.

What's the solution?

It is necessary to "save" the tarantoolctl utility in order to use it regardless of whether it is part of future Tarantool packages or not. This can be done by simply copying the file to the root of the project directory.

How it was tested

Debian 11

$ docker run -v /tarantool:/tarantool -it debian:11 /bin/bash
root@14acb818b457:/# apt-get update && apt-get install python3-pip -y
root@14acb818b457:/# python3 --version
Python 3.9.2
root@14acb818b457:/tarantool/test-run# pip install -r requirements.txt
root@14acb818b457:/tarantool/static-build/build# dpkg -i tarantool_3.0.0~alpha1-1_amd64.deb
root@14acb818b457:/tarantool/static-build/build# tarantool --version
Tarantool 3.0.0-alpha1-0-gef6335e
...
root@14acb818b457:/tarantool/test# ./test-run.py --force --builddir ../static-build/tarantool-prefix/src/tarantool-build --executable /usr/bin/tarantool
...
Tarantool server information:
 | Found executable at /usr/bin/tarantool
 | Found tarantoolctl at /tarantool/test-run/tarantoolctl

 | Tarantool 3.0.0-alpha1-0-gef6335e
 | Target: Linux-x86_64-RelWithDebInfo
 | Build options: cmake . -DCMAKE_INSTALL_PREFIX=/tarantool/static-build/tarantool-prefix -DENABLE_BACKTRACE=TRUE
 | Compiler: GNU-8.3.1
 | C_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/tarantool=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type
 | CXX_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/tarantool=. -std=c++11 -Wall -Wextra -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type

Detected build mode: Release
...
...
Statistics:
* pass: 1613
* disabled: 167
* skip: 21

Fedora 36

$ docker run -v /tarantool:/tarantool -it fedora:36 /bin/bash
[root@e118755ec5e2 /]# yum update -y
[root@e118755ec5e2 /]# yum install python3-pip
[root@e118755ec5e2 /]# python3 --version
Python 3.10.11
[root@e118755ec5e2 build]# rpm -i tarantool-3.0.0~alpha1-1.x86_64.rpm
[root@e118755ec5e2 build]# tarantool --version
Tarantool 3.0.0-alpha1-0-gef6335e
...
[root@e118755ec5e2 test-run]# pip install -r requirements.txt
[root@e118755ec5e2 test]# ./test-run.py --force --builddir ../static-build/tarantool-prefix/src/tarantool-build --executable /usr/bin/tarantool
...
Tarantool server information:
 | Found executable at /usr/bin/tarantool
 | Found tarantoolctl at /tarantool/test-run/tarantoolctl

 | Tarantool 3.0.0-alpha1-0-gef6335e
 | Target: Linux-x86_64-RelWithDebInfo
 | Build options: cmake . -DCMAKE_INSTALL_PREFIX=/tarantool/static-build/tarantool-prefix -DENABLE_BACKTRACE=TRUE
 | Compiler: GNU-8.3.1
 | C_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/tarantool=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type
 | CXX_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -static-libstdc++ -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/tarantool=. -std=c++11 -Wall -Wextra -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type

Detected build mode: Release
...
...
Statistics:
* pass: 1612 (flaky: 1)
* disabled: 167
* skip: 21

Close #400

coveralls commented 1 year ago

Coverage Status

coverage: 62.608% (-0.09%) from 62.695% when pulling 8b7283deaa8550554d12bdf20340ca037435df7c on ochaplashkin:add-static-build-support into 704420eb12e17836d585d4418da5bcb60be9ccaa on tarantool:master.