Skip to content
Snippets Groups Projects
  • Vladimir Davydov's avatar
    8509f163
    cmake: allow to set arbitrary version · 8509f163
    Vladimir Davydov authored
    This commit allows to override Tarantool version detection by setting
    CMake TARANTOOL_VERSION variable. This is needed to build Tarantool as a
    part of tarantool/sdk, which sets its own, extended version.
    
    Also, this commit updates box-py/args.test.py to allow arbitrary tags
    appended to the version (tarantool/sdk appends -rNNN).
    8509f163
    History
    cmake: allow to set arbitrary version
    Vladimir Davydov authored
    This commit allows to override Tarantool version detection by setting
    CMake TARANTOOL_VERSION variable. This is needed to build Tarantool as a
    part of tarantool/sdk, which sets its own, extended version.
    
    Also, this commit updates box-py/args.test.py to allow arbitrary tags
    appended to the version (tarantool/sdk appends -rNNN).
args.result 3.70 KiB
tarantool --help
Tarantool - a Lua application server

Usage: tarantool script.lua [OPTIONS] [SCRIPT [ARGS]]

All command line options are passed to the interpreted script.
When no script name is provided, the server responds to:
  -h, --help			display this help and exit
  -v, --version			print program version and exit
  -e EXPR			execute string 'EXPR'
  -l NAME			require library 'NAME'
  -i				enter interactive mode after executing 'SCRIPT'
  --				stop handling options
  -				execute stdin and stop handling options

Please visit project home page at http://tarantool.org
to see online documentation, submit bugs or contribute a patch.

tarantool -h
Tarantool - a Lua application server

Usage: tarantool script.lua [OPTIONS] [SCRIPT [ARGS]]

All command line options are passed to the interpreted script.
When no script name is provided, the server responds to:
  -h, --help			display this help and exit
  -v, --version			print program version and exit
  -e EXPR			execute string 'EXPR'
  -l NAME			require library 'NAME'
  -i				enter interactive mode after executing 'SCRIPT'
  --				stop handling options
  -				execute stdin and stop handling options

Please visit project home page at http://tarantool.org
to see online documentation, submit bugs or contribute a patch.

tarantool -Z
tarantool: invalid option

tarantool --no-such-option
tarantool: unrecognized option

tarantool --no-such-option --version
tarantool: unrecognized option

tarantool --version
Tarantool 2.<minor>.<patch>-<suffix>
Target: platform <build>
Build options: flags
Compiler: cc
C_FLAGS: flags
CXX_FLAGS: flags

tarantool -v
Tarantool 2.<minor>.<patch>-<suffix>
Target: platform <build>
Build options: flags
Compiler: cc
C_FLAGS: flags
CXX_FLAGS: flags

tarantool -V
Tarantool 2.<minor>.<patch>-<suffix>
Target: platform <build>
Build options: flags
Compiler: cc
C_FLAGS: flags
CXX_FLAGS: flags

tarantool ${SOURCEDIR}/test/box-py/args.lua
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua

tarantool ${SOURCEDIR}/test/box-py/args.lua 1 2 3
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => 1
arg[2] => 2
arg[3] => 3

tarantool ${SOURCEDIR}/test/box-py/args.lua 1 2 3 -V
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => 1
arg[2] => 2
arg[3] => 3
arg[4] => -V

tarantool ${SOURCEDIR}/test/box-py/args.lua -V 1 2 3
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => -V
arg[2] => 1
arg[3] => 2
arg[4] => 3

tarantool ${SOURCEDIR}/test/box-py/args.lua 1 2 3 --help
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => 1
arg[2] => 2
arg[3] => 3
arg[4] => --help

tarantool ${SOURCEDIR}/test/box-py/args.lua --help 1 2 3
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => --help
arg[2] => 1
arg[3] => 2
arg[4] => 3

tarantool -V ${SOURCEDIR}/test/box-py/args.lua 1 2 3
Tarantool 2.<minor>.<patch>-<suffix>
Target: platform <build>
Build options: flags
Compiler: cc
C_FLAGS: flags
CXX_FLAGS: flags

tarantool -e print(1) os.exit() print(2)
1

tarantool -e print(1) -e os.exit() -e print(1) -e os.exit() -e print(1)
1

tarantool -e print('Hello') ${SOURCEDIR}/test/box-py/args.lua 1 2 3
Hello
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => 1
arg[2] => 2
arg[3] => 3

tarantool -e a = 10 -e print(a) ${SOURCEDIR}/test/box-py/args.lua 1 2 3 --help
10
arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => 1
arg[2] => 2
arg[3] => 3
arg[4] => --help

tarantool -e print(rawget(_G, 'log') == nil) -e io.flush() -l log -e print(log.info('Hello')) ${SOURCEDIR}/test/box-py/args.lua 1 2 3 --help
true
Hello

arg[-1] => tarantool
arg[0] => ${SOURCEDIR}/test/box-py/args.lua
arg[1] => 1
arg[2] => 2
arg[3] => 3
arg[4] => --help