From c04073afe9c0cbf82fff61567e087124ba2a964d Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Wed, 6 Nov 2024 15:04:22 +0100 Subject: feat(rca): Print also last failure line This is mainly for easy detection of known issues, so only new or unsure failures need closer investigation. Change-Id: I6ebae2a0917ad229f9cfef5e56614b0a0ca73474 Signed-off-by: Vratko Polak --- resources/tools/scripts/rca_console_logs.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/resources/tools/scripts/rca_console_logs.sh b/resources/tools/scripts/rca_console_logs.sh index 58d61a1818..a541a3f1cb 100644 --- a/resources/tools/scripts/rca_console_logs.sh +++ b/resources/tools/scripts/rca_console_logs.sh @@ -50,6 +50,23 @@ for i in {1..999}; do if fgrep -q ', 0 failed' "final.txt"; then echo -ne "${i}: skip ${final}\t\t" else + echo +# fgrep '| FAIL' "console.log" | fgrep -v 'Tests' + + awk ' + /\| FAIL \|/ { + if ($0 !~ /Tests/) { + print + getline + while ($0 !~ /^[-=]+$/) { + last_line = $0 + getline + } + print last_line + } + } + ' "console.log" + echo -ne "${i}: investigate ${final}\t\t" fi # TODO: Simplify this topology detection. -- cgit 1.2.3-korg