diff --git a/buildLogAnalyzer.py b/buildLogAnalyzer.py index 95387739d77..3130c554009 100755 --- a/buildLogAnalyzer.py +++ b/buildLogAnalyzer.py @@ -122,6 +122,8 @@ def __init__( "ignoreWarning": "compWarn", "ok": "ok", } + + self.cmsswVersion = os.getenv("CMSSW_VERSION", "master") # get the lists separately for "priority" treatment ... self.errMap = {} @@ -380,8 +382,8 @@ def makeHTMLSummaryPage(self): def makeHTMLLogFile(self, pkg): """docstring for makeHTMLFile""" - linePartsUrl = re.compile(r"\s*(src(/[^:]+):(\d+)):.*") - + linePartsUrl = re.compile(r"\s+(?P(?:.*/" + self.cmsswVersion + r"/)?(?Psrc/[^:(]+)[:(](?P\d+)\)?):") + if not pkg.name() in self.tagList: return htmlDir = "../html/" + pkg.name() + "/" @@ -413,9 +415,9 @@ def makeHTMLLogFile(self, pkg): if lineNo in pkg.errLines.keys(): m = linePartsUrl.match(newLine) if m: - branch = os.getenv("CMSSW_VERSION", "master") - url = "https://github.com/cms-sw/cmssw/blob/" + branch + m[2] + "#L" + m[3] - newLine = newLine.replace(m[1], '' + m[1] + "", 1) + url = "https://github.com/cms-sw/cmssw/blob/" + self.cmsswVersion + m["file"] + "#L" + m["line"] + + newLine = newLine.replace(m["full_path"], '' + m["full_path"] + "", 1) newLine = ( "