Skip to content

Commit

Permalink
app: disable stdout bufferization
Browse files Browse the repository at this point in the history
Fixes #119
  • Loading branch information
Totktonada committed May 29, 2023
1 parent ab30bd9 commit cba1018
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/app_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,18 @@ def logfile(self):
return os.path.join(self.vardir, file_name)

def prepare_args(self, args=[]):
cli_args = [os.path.join(os.getcwd(), self.current_test.name)] + args
# Disable stdout bufferization.
cli_args = [self.binary, '-e', "io.stdout:setvbuf('no')"]

# Disable schema upgrade if requested.
if self.disable_schema_upgrade:
cli_args = [self.binary, '-e',
self.DISABLE_AUTO_UPGRADE] + cli_args
cli_args.extend(['-e', self.DISABLE_AUTO_UPGRADE])

# Add path to the script (the test).
cli_args.extend([os.path.join(os.getcwd(), self.current_test.name)])

# Add extra args if provided.
cli_args.extend(args)

return cli_args

Expand Down

0 comments on commit cba1018

Please sign in to comment.