[llvm-commits] Fwd: [llvm] r122808 - /llvm/trunk/utils/lit/lit/TestRunner.py
pichet2000 at gmail.com
Thu Jan 6 03:57:14 CST 2011
forgot to cc the list
---------- Forwarded message ----------
From: Francois Pichet <pichet2000 at gmail.com>
Date: Thu, Jan 6, 2011 at 4:13 AM
Subject: Re: [llvm-commits] [llvm] r122808 -
To: "David A. Greene" <greened at obbligato.org>
On Tue, Jan 4, 2011 at 10:20 AM, David A. Greene <greened at obbligato.org>wrote:
> Francois Pichet <pichet2000 at gmail.com> writes:
> > Author: fpichet
> > Date: Tue Jan 4 04:23:42 2011
> > New Revision: 122808
> > URL: http://llvm.org/viewvc/llvm-project?rev=122808&view=rev
> > Log:
> > Disable r122754 on Windows: was causing all lit tests to fail.
> > Modified:
> > llvm/trunk/utils/lit/lit/TestRunner.py
> > Modified: llvm/trunk/utils/lit/lit/TestRunner.py
> > URL:
> > --- llvm/trunk/utils/lit/lit/TestRunner.py (original)
> > +++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Jan 4 04:23:42 2011
> > @@ -451,8 +451,12 @@
> > # expression pattern a with substitution b in line ln.
> > def processLine(ln):
> > # Apply substitutions
> > + # FIXME: Investigate why re.sub doesn't work on Windows
> > for a,b in substitutions:
> > - ln = re.sub(a, b, ln)
> > + if kIsWindows:
> > + ln = ln.replace(a,b)
> > + else:
> > + ln = re.sub(a, b, ln)
> > # Strip the trailing newline and any extra whitespace.
> > return ln.strip()
> This can't possibly work. "a" is a regular expression. A replace isn't
> going to match it.
The problem on Windows is that re.sub will replace \t with a tab character.
I still don't understand why you need to do a re.sub here instead of a
replace. Doing a replace work for me. Give me an example of "a" as a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits