From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Igor Munkin <imun@tarantool.org>, Sergey Ostanevich <sergos@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH luajit] test: fix directory detection in lua-Harness suite Date: Fri, 16 Apr 2021 21:21:00 +0300 [thread overview] Message-ID: <20210416182100.10115-1-skaplun@tarantool.org> (raw) <314-regex.t> uses `arg[0]:find'314'` to determine the name of the directory where rx_* files are located. This leads to the test failure, when lua-Harness suite run in the directory containing "314" in its name, because the found path doesn't contain the required files. This patch fixes directory name detection. Follows up tarantool/tarantool#5844 --- I tested it locally on branch in directory containing "314" in the name. Also, I grepped the test suites with "find", "match", "sub" patterns, but didn't see other places with such bug like that. Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-harness-314-find-bug Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-harness-314-find-bug test/lua-Harness-tests/314-regex.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lua-Harness-tests/314-regex.t b/test/lua-Harness-tests/314-regex.t index ad4554cd..58cdb66e 100755 --- a/test/lua-Harness-tests/314-regex.t +++ b/test/lua-Harness-tests/314-regex.t @@ -164,7 +164,7 @@ local function split (line) end local test_number = 0 -local dirname = arg[0]:sub(1, arg[0]:find'314' -1) +local dirname = arg[0]:gsub('([^/]+)%.t$', '') for _, filename in ipairs(test_files) do local f, msg = io.open(dirname .. filename, 'r') if f == nil then -- 2.31.0
next reply other threads:[~2021-04-16 18:22 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-16 18:21 Sergey Kaplun via Tarantool-patches [this message] 2021-04-19 13:42 ` Igor Munkin via Tarantool-patches 2021-04-19 14:09 ` Sergey Ostanevich via Tarantool-patches 2021-04-19 19:39 ` Igor Munkin via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210416182100.10115-1-skaplun@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=sergos@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] test: fix directory detection in lua-Harness suite' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox