Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions testgres/plugins/pg_probackup2/pg_probackup2/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def __init__(self, test_class: unittest.TestCase,
self.verbose = init_params.verbose
self.archive_compress = init_params.archive_compress
self.test_class.output = None
self.execution_time = None

def run(self, command, gdb=False, old_binary=False, return_id=True, env=None,
skip_log_directory=False, expect_error=False, use_backup_dir=True):
Expand Down Expand Up @@ -113,11 +114,15 @@ def run(self, command, gdb=False, old_binary=False, return_id=True, env=None,
cmdline = ['gdbserver'] + ['localhost:' + str(gdb_port)] + cmdline
print("pg_probackup gdb suspended, waiting gdb connection on localhost:{0}".format(gdb_port))

start_time = time.time()
self.test_class.output = subprocess.check_output(
cmdline,
stderr=subprocess.STDOUT,
env=env
).decode('utf-8', errors='replace')
end_time = time.time()
self.execution_time = end_time - start_time

if command[0] == 'backup' and return_id:
# return backup ID
for line in self.test_class.output.splitlines():
Expand Down