From 94c83310182228dcb959f390c6a513cbdebe4976 Mon Sep 17 00:00:00 2001 From: Dalibor Pospisil Date: Fri, 2 Feb 2018 15:13:46 +0100 Subject: [PATCH 3/5] move final summary printing to rlJournalEnd also put the text to journal.txt this will ensure the summary is always printed at the end and is also present in the text file --- src/journal.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/journal.sh b/src/journal.sh index 04e4a10..867d08f 100644 --- a/src/journal.sh +++ b/src/journal.sh @@ -242,6 +242,8 @@ rlJournalEnd(){ __INTERNAL_ENDTIME=$__INTERNAL_TIMESTAMP __INTERNAL_update_journal_txt + __INTERNAL_PrintHeadLog "${__INTERNAL_TEST_NAME}" 2>&1 + if [ -n "$TESTID" ] ; then __INTERNAL_JournalXMLCreate $BEAKERLIB_COMMAND_SUBMIT_LOG -T $TESTID -l $__INTERNAL_BEAKERLIB_JOURNAL \ @@ -252,6 +254,10 @@ rlJournalEnd(){ fi echo "#End of metafile" >> $__INTERNAL_BEAKERLIB_METAFILE + + __INTERNAL_LogText "Phases: $__INTERNAL_PHASES_PASSED good, $__INTERNAL_PHASES_FAILED bad" LOG 2>&1 + __INTERNAL_LogText "RESULT: $__INTERNAL_TEST_NAME" $__INTERNAL_PHASES_WORST_RESULT 2>&1 + __INTERNAL_JournalXMLCreate __INTERNAL_TestResultsSave } @@ -434,11 +440,6 @@ rlJournalPrintText(){ [[ -t 1 ]] && textfile="$__INTERNAL_BEAKERLIB_JOURNAL_COLORED" || textfile="$__INTERNAL_BEAKERLIB_JOURNAL_TXT" cat "$textfile" - local __INTERNAL_LogText_no_file=1 - __INTERNAL_PrintHeadLog "${__INTERNAL_TEST_NAME}" 2>&1 - __INTERNAL_LogText "Phases: $__INTERNAL_PHASES_PASSED good, $__INTERNAL_PHASES_FAILED bad" LOG 2>&1 - __INTERNAL_LogText "RESULT: $__INTERNAL_TEST_NAME" $__INTERNAL_PHASES_WORST_RESULT 2>&1 - return 0 } -- 2.14.3