From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D1D39469719 for ; Tue, 18 Feb 2020 21:01:11 +0300 (MSK) From: Olga Arkhangelskaia Date: Tue, 18 Feb 2020 21:01:01 +0300 Message-Id: <20200218180101.37385-1-arkholga@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] test_run: add path option to grep_log List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org While using grep_log it is useful to have a possibility to go through crashed instance log. Usage in case of crashed instance: test_run:grep_log(nil, str-to-find, nil, {path=path_to_log}) Closes #196 --- Issue:https://github.com/tarantool/test-run/issues/196 Branch:https://github.com/tarantool/test-run/pull/new/OKriw/gh-196-Extend-grep_log-for-crashed-instances test_run.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_run.lua b/test_run.lua index 4d8132d..68dba53 100644 --- a/test_run.lua +++ b/test_run.lua @@ -326,7 +326,9 @@ end local function grep_log(self, node, what, bytes, opts) local opts = opts or {} local noreset = opts.noreset or false - local filename = self:eval(node, "box.cfg.log")[1] + -- node is used in case of alive instance, otherwise path to log can be + -- used for path + local filename = opts.path or self:eval(node, "box.cfg.log")[1] local file = fio.open(filename, {'O_RDONLY', 'O_NONBLOCK'}) local function fail(msg) -- 2.20.1 (Apple Git-117)