From 38815ca7a1baf8a01d6e93663fffc79edf4afda0 Mon Sep 17 00:00:00 2001 From: Teng Jian Khoo <khoo@cern.ch> Date: Mon, 10 Jun 2024 16:09:35 +0200 Subject: [PATCH 1/2] Fix unassigned variable --- Trigger/TrigValidation/TrigValTools/bin/check_log.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Trigger/TrigValidation/TrigValTools/bin/check_log.py b/Trigger/TrigValidation/TrigValTools/bin/check_log.py index a3ffd7ac655d..ac028eceb7de 100755 --- a/Trigger/TrigValidation/TrigValTools/bin/check_log.py +++ b/Trigger/TrigValidation/TrigValTools/bin/check_log.py @@ -140,6 +140,7 @@ def scanLogfile(args, logfile, ignorePattern=[]): tPattern = re.compile('|'.join(backtrace)) fpeStartPattern = re.compile('|'.join(fpeTracebackStart)) fpeContPattern = re.compile('|'.join(fpeTracebackCont)) + ignoreDict = None categories = [] if args.warnings is True: -- GitLab From d927c111177099502858284a345a27a88a5ba4a0 Mon Sep 17 00:00:00 2001 From: Teng Jian Khoo <khoo@cern.ch> Date: Mon, 10 Jun 2024 16:09:46 +0200 Subject: [PATCH 2/2] Correct FPE tracing logic --- Trigger/TrigValidation/TrigValTools/bin/check_log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Trigger/TrigValidation/TrigValTools/bin/check_log.py b/Trigger/TrigValidation/TrigValTools/bin/check_log.py index ac028eceb7de..2dd9b0a859cd 100755 --- a/Trigger/TrigValidation/TrigValTools/bin/check_log.py +++ b/Trigger/TrigValidation/TrigValTools/bin/check_log.py @@ -71,7 +71,7 @@ fpeTracebackCont = [ ' included from : ', ' in library : ', ] -regexMap['backtrace'].extend(fpeTracebackStart) +regexMap['fpe'].extend(fpeTracebackStart) # Warning keywords regexMap['warning'] = ['WARNING '] @@ -146,7 +146,7 @@ def scanLogfile(args, logfile, ignorePattern=[]): if args.warnings is True: categories += ['warning'] if args.errors is True: - categories += ['error/fatal', 'prohibited', 'python error', 'backtrace'] + categories += ['error/fatal', 'prohibited', 'python error', 'fpe', 'backtrace'] igLevels = re.compile('|'.join(ignorePattern)) @@ -175,7 +175,7 @@ def scanLogfile(args, logfile, ignorePattern=[]): resultsA['backtrace'].append(line) elif fpeTracing: # Continue following FPE so long as recognised - if fpeContPattern.search(line): + if fpeStartPattern.search(line) or fpeContPattern.search(line): resultsA['fpe'].append(line) else: fpeTracing = False -- GitLab