[PATCH] llvm-lit: Allow compiler-rt tests to run from the source tree

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Mar 31 16:25:17 PDT 2014


On Mar 31, 2014, at 1:43, Alexey Samsonov <samsonov at google.com> wrote:

> Thanks, this is certainly a nice-to-have feature!
> 
> I'm a bit sad that we might need to copy the magic you use in test/profile/lit.cfg to numerous test/xsan/lit.cfg configs, and would prefer some generic approach instead.
> However, if you can't think of the good way to do it right now, feel free to commit your change,

r205262 and r205263

> we can revisit this later.

Yes, it is sad!

I think this could be fixed with a larger change to llvm-lit.  Right now it relies
on explicit hooks to sub-projects.  I imagine it could replace the srcdir-relative
argument with a builddir-relative argument based on the canonical absolute path of
the argument (i.e., is it within the srcdir?).

If I get a chance I might look into that later.

> 
> 
> On Sat, Mar 29, 2014 at 1:31 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> This is a pair of patches that allow compiler-rt tests to be run
> from the source tree.
> 
> The initial test for InstrProf (under review "[PATCH] InstrProf:
> Add initial compiler-rt test" [1]) cannot be run from the source
> tree.  For example, with cmake+ninja, a user must:
> 
>     $ path/to/build/bin/llvm-lit path/to/build/projects/compiler-rt/test/profile
> 
> or:
> 
>     $ cd path/to/build
>     $ ninja check-profile
> 
> Both are inconvenient when maintaining tests.
> 
> With this pair of patches, users can also call, e.g.:
> 
>     $ cd path/to/src/projects/compiler-rt
>     $ path/to/build/bin/llvm-lit test/profile
> 
> The other compiler-rt lit.cfg files can be easily updated to use
> the same mechanism.
> 
> [1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140324/210812.html
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Alexey Samsonov, MSK




More information about the llvm-commits mailing list