From 22e07b6cfab3179baf4fda4ab941c40c322d768c Mon Sep 17 00:00:00 2001 From: Davide Principi Date: Mon, 27 Nov 2023 16:24:43 +0100 Subject: [PATCH] tests. Collect full node journal --- tests/__init__.robot | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/__init__.robot b/tests/__init__.robot index ac07ce2..deac134 100644 --- a/tests/__init__.robot +++ b/tests/__init__.robot @@ -1,8 +1,12 @@ *** Settings *** Library SSHLibrary +Library DateTime +Suite Setup Setup connection and test suite tools +Suite Teardown Tear down connection and test suite tools *** Variables *** ${SSH_KEYFILE} %{HOME}/.ssh/id_ecdsa +${NODE_ADDR} 127.0.0.1 *** Keywords *** Connect to the node @@ -11,5 +15,17 @@ Connect to the node ${output} = Execute Command systemctl is-system-running --wait Should Be True '${output}' == 'running' or '${output}' == 'degraded' -*** Settings *** -Suite Setup Connect to the Node +Setup connection and test suite tools + Connect to the node + Save the journal begin timestamp + +Tear down connection and test suite tools + Collect the suite journal + +Save the journal begin timestamp + ${tsnow} = Get Current Date result_format=epoch + Set Global Variable ${JOURNAL_SINCE} ${tsnow} + +Collect the suite journal + Execute Command journalctl -S @${JOURNAL_SINCE} >journal-dump.log + Get File journal-dump.log ${OUTPUT DIR}/journal-${SUITE NAME}.log