<div dir="ltr"><div><div>Hi Alexey,<br><br></div>Can you provide more details please? Do you build in tree or out of tree?<br><br>Thanks<br><br></div>Galina<br><div><div><br></div></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Tue, May 28, 2013 at 3:09 AM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hm the buildbots are going red :(<div>Reverting this change with my fix altogether.</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 1:44 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Galina!</div><br><div class="gmail_extra"><div class="gmail_quote"><div>On Sun, May 26, 2013 at 7:58 AM, Galina Kistanova <span dir="ltr"><<a href="mailto:gkistanova@gmail.com" target="_blank">gkistanova@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: gkistanova<br>
Date: Sat May 25 22:58:41 2013<br>
New Revision: 182715<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=182715&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=182715&view=rev</a><br>
Log:<br>
Fixed bug when tests in executable partially used absolute paths.<br>
<br>
Modified:<br>
    llvm/trunk/utils/lit/lit/TestFormats.py<br>
<br>
Modified: llvm/trunk/utils/lit/lit/TestFormats.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestFormats.py?rev=182715&r1=182714&r2=182715&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestFormats.py?rev=182715&r1=182714&r2=182715&view=diff</a><br>



==============================================================================<br>
--- llvm/trunk/utils/lit/lit/TestFormats.py (original)<br>
+++ llvm/trunk/utils/lit/lit/TestFormats.py Sat May 25 22:58:41 2013<br>
@@ -61,9 +61,9 @@ class GoogleTest(object):<br>
         (dirname, basename) = os.path.split(execpath)<br>
         # Discover the tests in this executable.<br>
         for testname in self.getGTestTests(execpath, litConfig, localConfig):<br>
-            testPath = path_in_suite + (dirname, basename, testname)<br>
-            yield Test.Test(testSuite, testPath, localConfig)<br>
-<br>
+            testPath_in_suite = path_in_suite + (basename, testname)<br>
+            yield Test.Test(testSuite, testPath_in_suite, localConfig)<br></blockquote><div><br></div></div><div>I think this is wrong. When I run unittests locally, file /some/gtest/executable is called as:</div><div>
/some/gtest/executable --gtest_filter="executable/test.case"</div><div>instead of:</div><div>/some/gtest/executable --gtest_filter="test.case"</div><div><br></div><div>As a result, *all the unit tests silently pass*.</div>


<div>I think r182758 deals with it, but double-checking would be nice.</div><div><div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



+<br>
     def getTestsInDirectory(self, testSuite, path_in_suite,<br>
                             litConfig, localConfig):<br>
         source_path = testSuite.getSourcePath(path_in_suite)<br>
@@ -73,15 +73,17 @@ class GoogleTest(object):<br>
                 # Iterate over executables in a directory.<br>
                 if not os.path.normcase(filename) in self.test_sub_dir:<br>
                     continue<br>
+                filepath_in_suite = path_in_suite + (filename, )<br>
                 for subfilename in os.listdir(filepath):<br>
                     execpath = os.path.join(filepath, subfilename)<br>
                     for test in self.getTestsInExecutable(<br>
-                            testSuite, path_in_suite, execpath,<br>
+                            testSuite, filepath_in_suite, execpath,<br>
                             litConfig, localConfig):<br>
                       yield test<br>
             elif ('.' in self.test_sub_dir):<br>
+                filepath_in_suite = path_in_suite + (filename, )<br>
                 for test in self.getTestsInExecutable(<br>
-                        testSuite, path_in_suite, filepath,<br>
+                        testSuite, filepath_in_suite, filepath,<br>
                         litConfig, localConfig):<br>
                     yield test<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Alexey Samsonov, MSK</div>
</font></span></div>
</blockquote></div><br></div>