diff options
author | Vratko Polak <vrpolak@cisco.com> | 2024-11-06 15:04:22 +0100 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2024-11-06 15:04:22 +0100 |
commit | c04073afe9c0cbf82fff61567e087124ba2a964d (patch) | |
tree | f97ebec420ec66f61f319bf62ac7629477d5e4dd | |
parent | 33fefcbfa1718a58e4076d974c059e6e6cd31702 (diff) |
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 <vrpolak@cisco.com>
-rw-r--r-- | resources/tools/scripts/rca_console_logs.sh | 17 |
1 files changed, 17 insertions, 0 deletions
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. |