[llvm-commits] [llvm] r122808 - /llvm/trunk/utils/lit/lit/TestRunner.py

David A. Greene greened at obbligato.org
Tue Jan 4 07:20:03 PST 2011


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: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=122808&r1=122807&r2=122808&view=diff
> ==============================================================================
> --- 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.

                               -Dave



More information about the llvm-commits mailing list