Skip to content

Commit

Permalink
Refactor command to run luatest test
Browse files Browse the repository at this point in the history
- Remove `--shuffle=none` option since it is the default for luatest.
- Use the full names for options.
- Update doc string for `execute()` method.
  • Loading branch information
ylobankov committed May 11, 2023
1 parent 1da6481 commit 99b6626
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/luatest_server.py
Expand Up @@ -35,15 +35,14 @@ def __init__(self, *args, **kwargs):
def execute(self, server):
"""Execute test by luatest command
Execute 'luatest -c -v <name>_test.lua -o tap --shuffle none'
Provide a verbose output in the tap format.
Use shuffle option in none mode for avoiding mixing tests.
Use capture mode.
Execute `luatest -c --verbose <name>_test.lua --output tap` command.
Use capture mode. 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)
command = ['luatest', '-c', '-v', script, '-o', 'tap', '--shuffle',
'none']
command = ['luatest', '-c', '--verbose', script, '--output', 'tap']
if Options().args.pattern:
for p in Options().args.pattern:
command.extend(['--pattern', p])
Expand Down

0 comments on commit 99b6626

Please sign in to comment.