本文整理汇总了Python中lib.tarantool_server.TarantoolServer.find_exe方法的典型用法代码示例。如果您正苦于以下问题:Python TarantoolServer.find_exe方法的具体用法?Python TarantoolServer.find_exe怎么用?Python TarantoolServer.find_exe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.tarantool_server.TarantoolServer
的用法示例。
在下文中一共展示了TarantoolServer.find_exe方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: module_init
# 需要导入模块: from lib.tarantool_server import TarantoolServer [as 别名]
# 或者: from lib.tarantool_server.TarantoolServer import find_exe [as 别名]
def module_init():
""" Called at import """
args = Options().args
# Change the current working directory to where all test
# collections are supposed to reside
# If script executed with (python test-run.py) dirname is ''
# so we need to make it .
path = os.path.dirname(sys.argv[0])
if not path:
path = '.'
os.chdir(path)
setenv()
warn_unix_sockets_at_start(args.vardir)
# always run with clean (non-existent) 'var' directory
try:
shutil.rmtree(args.vardir)
except OSError:
pass
args.builddir = os.path.abspath(os.path.expanduser(args.builddir))
SOURCEDIR = os.path.dirname(os.getcwd())
BUILDDIR = args.builddir
os.environ["SOURCEDIR"] = SOURCEDIR
os.environ["BUILDDIR"] = BUILDDIR
soext = sys.platform == 'darwin' and 'dylib' or 'so'
os.environ["LUA_PATH"] = SOURCEDIR+"/?.lua;"+SOURCEDIR+"/?/init.lua;;"
os.environ["LUA_CPATH"] = BUILDDIR+"/?."+soext+";;"
TarantoolServer.find_exe(args.builddir)
UnittestServer.find_exe(args.builddir)
示例2: main
# 需要导入模块: from lib.tarantool_server import TarantoolServer [as 别名]
# 或者: from lib.tarantool_server.TarantoolServer import find_exe [as 别名]
def main():
options = Options()
oldcwd = os.getcwd()
# Change the current working directory to where all test
# collections are supposed to reside
# If script executed with (python test-run.py) dirname is ''
# so we need to make it .
path = os.path.dirname(sys.argv[0])
if not path:
path = '.'
os.chdir(path)
setenv()
failed_tests = []
try:
color_stdout("Started {}\n".format(" ".join(sys.argv)), schema='tr_text')
suite_names = []
if options.args.suites != []:
suite_names = options.args.suites
else:
for root, dirs, names in os.walk(os.getcwd()):
if "suite.ini" in names:
suite_names.append(os.path.basename(root))
suites = [TestSuite(suite_name, options.args) for suite_name in sorted(suite_names)]
TarantoolServer.find_exe(options.args.builddir)
UnittestServer.find_exe(options.args.builddir)
for suite in suites:
failed_tests.extend(suite.run_all())
except RuntimeError as e:
color_stdout("\nFatal error: {0}. Execution aborted.\n".format(e), schema='error')
if options.args.gdb:
time.sleep(100)
return (-1)
finally:
os.chdir(oldcwd)
if failed_tests and options.args.is_force:
color_stdout("\n===== {0} tests failed:".format(len(failed_tests))+"\n", schema='error')
for test in failed_tests:
color_stdout("----- "+test+"\n", schema='info')
return (-1 if failed_tests else 0)
示例3: TarantoolServer
# 需要导入模块: from lib.tarantool_server import TarantoolServer [as 别名]
# 或者: from lib.tarantool_server.TarantoolServer import find_exe [as 别名]
# encoding: utf-8
import os
import time
from lib.tarantool_server import TarantoolServer
# master server
master = server
master_sql = master.sql
# hot standby server
hot_standby = TarantoolServer()
hot_standby.deploy("replication/cfg/hot_standby.cfg",
hot_standby.find_exe(self.args.builddir),
os.path.join(self.args.vardir, "hot_standby"), need_init=False)
hot_standby_sql = hot_standby.sql
# replica server
replica = TarantoolServer()
replica.deploy("replication/cfg/replica.cfg",
replica.find_exe(self.args.builddir),
os.path.join(self.args.vardir, "replica"))
replica_sql = replica.sql
# Begin tuple id
id = 1
print """
# Insert 10 tuples to master
"""
for i in range(id, id + 10):
示例4: TarantoolServer
# 需要导入模块: from lib.tarantool_server import TarantoolServer [as 别名]
# 或者: from lib.tarantool_server.TarantoolServer import find_exe [as 别名]
import yaml
from lib.memcached_connection import MemcachedConnection
from lib.tarantool_server import TarantoolServer
sonet = """The expense of spirit
in a waste of shame
Is lust in action;
and till action, lust""".split('\n')
master = server
master_memcached = master.memcached
replica = TarantoolServer()
replica.deploy("replication/cfg/replica.cfg",
replica.find_exe(self.args.builddir),
os.path.join(self.args.vardir, "replica"))
replica_memcached = replica.memcached
###################################
def get_lsn(serv):
serv_admin = serv.admin
resp = serv_admin("box.info.lsn", silent=True)
return yaml.load(resp)[0]
def wait(serv_master = master, serv_replica = replica):
lsn = get_lsn(serv_master)
serv_replica.wait_lsn(lsn)
return lsn
def get_memcached_len(serv):