From 76477e87e5f59c5616924328404d931da9c43170 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 23 Nov 2020 18:11:41 +0000 Subject: [PATCH] Move tarantoolctl to test-run tool submodule Moved tarantoolctl to test-run tool submodule repository as: /test-run/.tarantoolctl Also set backward compability to use old path location: /test/.tarantoolctl as its primary place. --- .tarantoolctl | 15 +++++++++++++++ lib/tarantool_server.py | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .tarantoolctl diff --git a/.tarantoolctl b/.tarantoolctl new file mode 100644 index 00000000..5c46f8ac --- /dev/null +++ b/.tarantoolctl @@ -0,0 +1,15 @@ +-- Options for test-run tarantoolctl + +local workdir = os.getenv('TEST_WORKDIR') +default_cfg = { + pid_file = workdir, + wal_dir = workdir, + memtx_dir = workdir, + vinyl_dir = workdir, + log = workdir, + background = false, +} + +instance_dir = workdir + +-- vim: set ft=lua : diff --git a/lib/tarantool_server.py b/lib/tarantool_server.py index b98ed4db..946f7d64 100644 --- a/lib/tarantool_server.py +++ b/lib/tarantool_server.py @@ -767,7 +767,10 @@ def copy_files(self): if (e.errno == errno.ENOENT): continue raise - shutil.copy('.tarantoolctl', self.vardir) + tntctl_file = '.tarantoolctl' + if not os.path.exists(tntctl_file): + tntctl_file = os.path.join(self.TEST_RUN_DIR, '.tarantoolctl') + shutil.copy(tntctl_file, self.vardir) shutil.copy(os.path.join(self.TEST_RUN_DIR, 'test_run.lua'), self.vardir) # Need to use get here because of nondefault servers doesn't have ini.