Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] test_run: add path option to grep_log
@ 2020-02-18 18:01 Olga Arkhangelskaia
  2020-03-04 13:51 ` Alexander Turenko
  0 siblings, 1 reply; 5+ messages in thread
From: Olga Arkhangelskaia @ 2020-02-18 18:01 UTC (permalink / raw)
  To: tarantool-patches

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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-16  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 18:01 [Tarantool-patches] [PATCH] test_run: add path option to grep_log Olga Arkhangelskaia
2020-03-04 13:51 ` Alexander Turenko
2020-03-10 11:29   ` Olga Arkhangelskaia
2020-03-13  7:36     ` Alexander Turenko
     [not found]     ` <20200316091553.4hbyadvcubrpdzk4@tkn_work_nb>
2020-03-16  9:18       ` Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox