[PATCH] D35909: [lit] Port googletest lit tests to Windows

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 14:37:41 PDT 2017


rnk marked an inline comment as done.
rnk added inline comments.


================
Comment at: llvm/utils/lit/lit/formats/googletest.py:92
                 # Discover the tests in this executable.
+                litConfig.warning(subdir)
                 execpath = os.path.join(source_path, subdir, fn)
----------------
modocache wrote:
> My guess is that you may have added this for your own debugging? Or is this intentional?
Yep, removed.


================
Comment at: llvm/utils/lit/tests/googletest-format.py:9
 # CHECK: -- Testing:
-# CHECK: PASS: googletest-format :: DummySubDir/OneTest/FirstTest.subTestA
-# CHECK: FAIL: googletest-format :: DummySubDir/OneTest/FirstTest.subTestB
-# CHECK-NEXT: *** TEST 'googletest-format :: DummySubDir/OneTest/FirstTest.subTestB' FAILED ***
+# CHECK: PASS: googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA
+# CHECK: FAIL: googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB
----------------
modocache wrote:
> This is interesting, why do we need to handle upper- and lower-case here? Could you explain this in the commit message?
Because of this code:
  class GoogleTest(TestFormat):
      def __init__(self, test_sub_dirs, test_suffix):
          self.test_sub_dirs = os.path.normcase(str(test_sub_dirs)).split(';')

Maybe we don't need it?


https://reviews.llvm.org/D35909





More information about the llvm-commits mailing list