[llvm-commits] [llvm] r119781 - /llvm/trunk/utils/lit/lit/TestFormats.py

NAKAMURA Takumi geek4civic at gmail.com
Thu Nov 18 19:19:27 PST 2010


Author: chapuni
Date: Thu Nov 18 21:19:26 2010
New Revision: 119781

URL: http://llvm.org/viewvc/llvm-project?rev=119781&view=rev
Log:
lit.GoogleTest: On case-insensitive filesystem, matching should be case-insensitive when directory name is checked with test_sub_dir.

On MSVS8, ${CMAKE_CFG_INTDIR}, aka $(OutDir), has capitalized name(eg. Debug), although $(OutDir) is made with lower case(eg. debug).

Modified:
    llvm/trunk/utils/lit/lit/TestFormats.py

Modified: llvm/trunk/utils/lit/lit/TestFormats.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestFormats.py?rev=119781&r1=119780&r2=119781&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestFormats.py (original)
+++ llvm/trunk/utils/lit/lit/TestFormats.py Thu Nov 18 21:19:26 2010
@@ -9,7 +9,7 @@
 
 class GoogleTest(object):
     def __init__(self, test_sub_dir, test_suffix):
-        self.test_sub_dir = str(test_sub_dir).split(';')
+        self.test_sub_dir = os.path.normcase(str(test_sub_dir)).split(';')
         self.test_suffix = str(test_suffix)
 
         # On Windows, assume tests will also end in '.exe'.
@@ -59,7 +59,7 @@
         source_path = testSuite.getSourcePath(path_in_suite)
         for filename in os.listdir(source_path):
             # Check for the one subdirectory (build directory) tests will be in.
-            if not filename in self.test_sub_dir:
+            if not os.path.normcase(filename) in self.test_sub_dir:
                 continue
 
             filepath = os.path.join(source_path, filename)





More information about the llvm-commits mailing list