I think this is fine to commit, but you should mention that it's a WIP in the commit. =]<div><br></div><div>Some important future steps:</div><div><br></div><div>0) Rig the output tests to only run on machines where target == host where we know we can produce working binaries.</div>
<div><br></div><div>1) Get unittests building and running with lit as well. I'll admit I'm not as familiar w/ how to rig lit up to unittests. I did a pretty gross hack to run unit tests as part of 'make' (or 'ninja') step with CMake, and you should look at how other unittests work probably.</div>
<div><br></div><div>2) Hook the unittests and this output test into 'check-asan' and thus 'check-all'</div><div><br></div><div>3) Send a patch to enable recursing into the compiler-rt tree from the llvm tree with CMake and send an email to llvmdev letting folks know about this switch when it lands.</div>
<div><br></div><div>4) Get the install support worked out w/ CMake.</div><div><br></div><div>5) Eventually move development over to the CMake system, and move 'lit_tests' back to 'tests'. I think its fine to have separate tests under asan, tsan, etc.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 25, 2012 at 11:53 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think this is an awesome step, despite not being a fan of lit. It's the infrastructure we have, and we should share it.<div>
<br></div><div>I think we should probably also switch the unittests to run the same way rather than the setup I gave them initially where they are run as a part of the build.</div>
<div><br></div><div>I've left some more specific comments in the code review tool.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 25, 2012 at 10:43 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">Hi, llvm-commits!<div><br></div><div>AddressSanitizer is long a part of compiler-rt library, but it still uses custom Makefiles to run unit and regression tests.</div>

<div>This patch is supposed to be a first move towards integrating ASan regressions test into llvm lit-based testing infrastructure.</div>
<div>With this patch applied, one may run ASan reg tests by simply running "make check-asan" from cmake build tree:</div><div>* tests use fresh clang binary from current build tree.</div><div>* tests use the same RUN-lines syntax as llvm/clang reg tests (I've attached sample reg test to patch).</div>


<div><br></div><div>Could you please take a look if this is desirable direction and if this patch may be applied?</div><div><br></div><div>Note: Currently all ASan code and tests are located in projects/compiler-rt/lib/asan. (same is true for ThreadSanitizer which certainly</div>


<div>should soon be integrated into cmake build as well). Should we instead move all tests for different runtimes into /projects/compiler-rt/test</div><div>folder, or we may keep it as is?</div><div><br></div><div>Code review: <a href="http://codereview.appspot.com/6443046/" target="_blank">http://codereview.appspot.com/6443046/</a></div>

<span><font color="#888888">
<div><br></div><div>-- </div><div><div><div><div><div>Alexey Samsonov, MSK</div><br>
</div></div></div></div>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>