-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coverage: support tarantool binary with a suffix
Fix collecting coverage if tarantool binary has a suffix. For example, binaries installed with `tt install` always have a suffix and non-suffix symlink for an active binary (luatest resolves symlinks while working with a command). Closes #311
- Loading branch information
1 parent
4aecd8e
commit 3f13533
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
local t = require('luatest') | ||
local g = t.group() | ||
|
||
local utils = require('luatest.utils') | ||
|
||
g.test_is_tarantool_binary = function() | ||
local cases = { | ||
{'/usr/bin/tarantool', true}, | ||
{'/usr/local/bin/tarantool', true}, | ||
{'/usr/local/bin/tt', false}, | ||
{'/usr/bin/ls', false}, | ||
{'/home/myname/app/bin/tarantool', true}, | ||
{'/home/tarantool/app/bin/go-server', false}, | ||
{'/usr/bin/tarantool-ee_gc64-2.11.0-0-r577', true}, | ||
{'/home/tarantool/app/bin/tarantool', true}, | ||
{'/home/tarantool/app/bin/tarantool-ee_gc64-2.11.0-0-r577', true}, | ||
} | ||
|
||
for _, case in ipairs(cases) do | ||
local path, result = unpack(case) | ||
t.assert_equals(utils.is_tarantool_binary(path), result, | ||
("Unexpected result for %q"):format(path)) | ||
end | ||
end |