Skip to content

Commit 68d9b38

Browse files
naspiratoblinkov
authored andcommitted
Allure report: pssh commands for additional info in tests (#15470)
1 parent 343a413 commit 68d9b38

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

ydb/tests/olap/lib/allure_utils.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,18 @@ def _set_logs_command(test_info: dict[str, str], start_time: float, end_time: fl
5757
hosts.append(node.host)
5858
hosts_cmd = ' '.join([f'-H {h}' for h in hosts])
5959
tz = timezone('Europe/Moscow')
60-
start = datetime.fromtimestamp(start_time, tz).isoformat()
61-
end = datetime.fromtimestamp(end_time, tz).isoformat()
60+
start = datetime.fromtimestamp(start_time, tz)
61+
end = datetime.fromtimestamp(end_time, tz)
62+
start_iso = start.isoformat()
63+
end_iso = end.isoformat()
6264
time_cmd = f'-S "{start}" -U "{end}"'
63-
cmd = f"parallel-ssh {hosts_cmd} -o . 'ulimit -n 100500;unified_agent select {time_cmd} -s kikimr'"
64-
test_info['logs_command'] = f'<code>{cmd}</code>'
65+
time_cmd_iso = f'-S "{start_iso}" -U "{end_iso}"'
66+
not_ask_for_key = '-x \"-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"'
67+
68+
cmd = f"parallel-ssh {hosts_cmd} -i {not_ask_for_key} 'ulimit -n 100500;unified_agent select {time_cmd_iso} -s kikimr' 2>/dev/null 1>kikimr.log"
69+
dmesg_cmd = f"parallel-ssh {hosts_cmd} -i {not_ask_for_key} 'sudo journalctl -k {time_cmd} --grep ydb' 2>/dev/null 1>journalctrl.log"
70+
test_info['kikimr_log'] = f'<details><code>{cmd}</code></details>'
71+
test_info['kernel_log'] = f'<details><code>{dmesg_cmd}</code></details>'
6572

6673

6774
def allure_test_description(

0 commit comments

Comments
 (0)