<div dir="ltr">Hi Galina,<div><br></div><div style>I use cmake for an out-of-tree build (cmake -DCMAKE_BUILD_TYPE=Release ... /path/to/llvm). I think you may try to reproduce the problem by configuring cmake build tree,<br>
</div><div style>applying the change (breaking the unit test):</div><div style><br></div><div style><div>$ svn diff unittests/ADT/APFloatTest.cpp</div><div>Index: unittests/ADT/APFloatTest.cpp</div><div>===================================================================</div>
<div>--- unittests/ADT/APFloatTest.cpp<span class="" style="white-space:pre">   </span>(revision 182753)</div><div>+++ unittests/ADT/APFloatTest.cpp<span class="" style="white-space:pre"> </span>(working copy)</div><div>@@ -52,7 +52,7 @@</div>
<div>     f2.divide(Val2, rdmd);</div><div>     APFloat f3(12.0f);</div><div>     f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven);</div><div>-    EXPECT_EQ(12.0f, f1.convertToFloat());</div><div>+    EXPECT_EQ(13.0f, f1.convertToFloat());</div>
<div>   }</div><div> }</div><div><br></div><div style>then in the build tree:</div><div style>$ make check-llvm -j12<br></div><div style><div>Testing Time: 28.15s</div><div>  Expected Passes    : 8091</div><div>  Expected Failures  : 50</div>
<div>  Unsupported Tests  : 18</div><div><br></div><div style>OTOH:</div><div>$ unittests/ADT/ADTTests --gtest_filter=APFloatTest.FMA<br></div><div><div>Note: Google Test filter = APFloatTest.FMA</div><div>[==========] Running 1 test from 1 test case.</div>
<div>[----------] Global test environment set-up.</div><div>[----------] 1 test from APFloatTest</div><div>[ RUN      ] APFloatTest.FMA</div><div>/usr/local/google/llvm/unittests/ADT/APFloatTest.cpp:55: Failure</div><div>
Value of: f1.convertToFloat()</div><div>  Actual: 12</div><div>Expected: 13.0f</div><div>Which is: 13</div><div>[  FAILED  ] APFloatTest.FMA (1 ms)</div><div>[----------] 1 test from APFloatTest (1 ms total)</div><div><br>
</div><div>[----------] Global test environment tear-down</div><div>[==========] 1 test from 1 test case ran. (1 ms total)</div><div>[  PASSED  ] 0 tests.</div><div>[  FAILED  ] 1 test, listed below:</div><div>[  FAILED  ] APFloatTest.FMA</div>
<div><br></div><div> 1 FAILED TEST</div></div></div></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 11:48 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Galina<br><div><div><br></div></div></font></span></div><div class="HOEnZb"><div class="h5"><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><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><font color="#888888">-- <br><div>Alexey Samsonov, MSK</div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div>