Skip to content

Commit

Permalink
Adapt use luatest with new --no-clean option
Browse files Browse the repository at this point in the history
The `--no-clean` option was added after the luatest update [1]. Test-run
uses luatest but independently performs the preparation (creation and
cleaning of directories). Therefore this option was added to avoid
incompatibility between the two tools.

[1] tarantool/luatest@18859f6

Part of tarantool/luatest#308
  • Loading branch information
Oleg Chaplashkin committed Sep 14, 2023
1 parent 54fd886 commit 49313e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/luatest_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ def __init__(self, *args, **kwargs):
def execute(self, server):
"""Execute test by luatest command
Execute `luatest -c --verbose <name>_test.lua --output tap` command.
Disable capture mode. Provide a verbose output in the tap format.
Extend the command by `--pattern <pattern>` if the corresponding
option is provided.
Execute `luatest -c --no-clean --verbose <name>_test.lua --output tap`
command. Disable capture mode and deletion of the var directory.
Provide a verbose output in the tap format. Extend the command by
`--pattern <pattern>` if the corresponding option is provided.
"""
server.current_test = self
script = os.path.join(os.path.basename(server.testdir), self.name)
Expand All @@ -47,7 +47,7 @@ def execute(self, server):
# Add luatest as the script.
command.extend([server.luatest])
# Add luatest command-line options.
command.extend(['-c', '--verbose', script, '--output', 'tap'])
command.extend(['-c', '--no-clean', '--verbose', script, '--output', 'tap'])
if Options().args.pattern:
for p in Options().args.pattern:
command.extend(['--pattern', p])
Expand Down

0 comments on commit 49313e0

Please sign in to comment.