[PATCH] D37602: Properly hook debuginfo-tests up to lit and CMake

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 16:15:39 PDT 2017


zturner created this revision.
Herald added a subscriber: mgorny.

This is all a bit hairy and magical, and I don't entirely understand how this works, but here is what I am trying to achieve:

1. `debuginfo-tests` needs to be able to depend on both `clang` and `lld`.
2. It needs to work both with and without the monorepo
3. It should be opt-in

Currently the assumption is that you clone it under the `clang/test` folder, but the fact that it needs to depend on `lld` means that `clang` isn't really the best place for it.  Besides, this is already broken in the mono-repo unless you manually symlink it from `clang/test` which seems odd.

It currently runs automatically as part of `ninja check-clang`, and this satisfies the opt in requirement by saying that you opt in by cloning the repo into the clang tree the first place.  With this patch, the opt-in requirement is satisfied by creating a new cmake target for it, so if you want to run it you just run `ninja check-debuginfo`.

In order for all of this to work, I had to give it its own lit configs, and this is where things start going crazy.  These lit configs are a bit of magic to me, so I'm not sure if I did this right.  I copied the clang lit configs as the starting poitn, and deleted a bunch of stuff from them that I don't think we need for the purposes of debug info tests.  sanitizer stuff, clang tool stuff, etc.  in any case, on windows I can now run `ninja check-debuginfo` and it actually runs the test suite.

They all fail for me, but this is because it's trying to run a perl script to kick off the test, and my machine doesn't have perl on it.

What i need help with is:

1. Am I going about this all wrong?  Am I close?
2. Am I missing anything obvious with the lit configs?  Or not obvious?
3. I don't have a non mono-repo anymore, I would appreciate it if someone could help me test the non mono-repo case.


https://reviews.llvm.org/D37602

Files:
  debuginfo-tests/CMakeLists.txt
  debuginfo-tests/lit.cfg
  debuginfo-tests/lit.site.cfg.in
  llvm/CMakeLists.txt
  llvm/projects/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37602.114271.patch
Type: text/x-patch
Size: 18314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170907/8ce67a24/attachment.bin>


More information about the llvm-commits mailing list