# HG changeset patch # User cmlenz # Date 1123853265 0 # Node ID efd3df0de93a458b798c558fa41091e8befe9465 # Parent 4e3373472318e4ab61edc451bf59246ad83f6305 Canonicalize path names so that comparison works. Fixes #37. diff --git a/bitten/build/pythontools.py b/bitten/build/pythontools.py --- a/bitten/build/pythontools.py +++ b/bitten/build/pythontools.py @@ -65,7 +65,7 @@ match = msg_re.search(line) if match: type = msg_types.get(match.group('type')) - filename = match.group('file') + filename = os.path.realpath(match.group('file')) if filename.startswith(ctxt.basedir): filename = filename[len(ctxt.basedir) + 1:] lineno = int(match.group('line')) @@ -96,7 +96,7 @@ for summary_line in summary_file: match = summary_line_re.search(summary_line) if match: - filename = match.group(4) + filename = os.path.realpath(match.group(4)) modname = match.group(3) cov = int(match.group(2)) if filename.startswith(ctxt.basedir): @@ -138,8 +138,10 @@ results = xmlio.Fragment() for child in xmlio.parse(fd).children(): filename = child.attr.get('file') - if filename and filename.startswith(ctxt.basedir): - child.attr['file'] = filename[len(ctxt.basedir) + 1:] + if filename: + filename = os.path.realpath(filename) + if filename.startswith(ctxt.basedir): + child.attr['file'] = filename[len(ctxt.basedir) + 1:] results.append(child) ctxt.report(results) finally: diff --git a/bitten/recipe.py b/bitten/recipe.py --- a/bitten/recipe.py +++ b/bitten/recipe.py @@ -19,7 +19,7 @@ # Author: Christopher Lenz import logging -import os.path +import os import time from bitten.build import BuildError @@ -41,7 +41,7 @@ current_function = None def __init__(self, basedir): - self.basedir = basedir + self.basedir = os.path.realpath(basedir) self.output = [] def log(self, xml_elem):