This is an archive of the discontinued LLVM Phabricator instance.

[debuginfo-tests] Support moving debuginfo-tests to llvm/projects
ClosedPublic

Authored by hintonda on Dec 7 2017, 10:57 AM.

Details

Summary

Add cmake and lit files needed to run these tests as an
external project. Also, copy test_debuginfo.pl from llvm/utils since
it's only used here. The copy in llvm/utils must be maintained as
long as bots continue to include debuginfo-tests in clang/test.

The name of lit.cfg.py was changed to lit.config.py so tests will
still run correctly clang/test -- otherwise it would be picked up by
lit automatically.


(see D40972)
This is one of two independent patches designed to support moving the
debuginfo-test repo from clang/test to llvm/projects. While each
patch is completely independent and can be applied seperately, both
are required to actually move the repo.

Due to the independent nature of these patches, debuginfo-test can
coexist in both clang/test and llvm/projects, so testers can add
debuginfo-test to llvm/projects without the need to immediately remove
it from clang/test..

Once both patches land and all buildbots have moved debuginfo-test to
llvm/projects, llvm/utils/test-debuginfo.pl can be removed as well the
tools reference to it in clang/test/lit.cfg.py. At which point, only
llvm/projects will be supported.

Event Timeline

hintonda created this revision.Dec 7 2017, 10:57 AM
aprantl accepted this revision.Dec 7 2017, 4:06 PM

I tried this locally with debuginfo-tests checked out into tools/clang/test, and as far as I can tell the debuginfo-tests are only recognized once by lit.
Tentatively LGTM, but please do watch the bots after committing.

test_debuginfo.pl
2

It seems weird to have this file here, but not llgdb.py. I would either copy both or none.

This revision is now accepted and ready to land.Dec 7 2017, 4:06 PM

I tried this locally with debuginfo-tests checked out into tools/clang/test, and as far as I can tell the debuginfo-tests are only recognized once by lit.
Tentatively LGTM, but please do watch the bots after committing.

Great, I'll commit in the morning so I can watch the bots.

test_debuginfo.pl
2

lldgbb.py is already in debuginfo.-tests. This just puts them both in the same place.

zturner added inline comments.Dec 8 2017, 8:22 AM
lit.config.py
1 ↗(On Diff #125998)

I think the rename of this file is going to be a problem for the mono-repo case. In that, this will be the top-level directory tree and if there's no` lit.cfg.py`, lit won't find anything to run.

zturner added inline comments.Dec 8 2017, 8:29 AM
lit.config.py
1 ↗(On Diff #125998)

There needs to be a way to disable lit discovery of this suite only as part of the clang suite, and not as part of anything else that might cause it to be discovered.

hintonda added inline comments.Dec 8 2017, 8:55 AM
lit.site.cfg.py.in
26

This is how lit find lit.config.py.

I'll test the monorepo variant and get back to you.

zturner added inline comments.Dec 8 2017, 9:51 AM
lit.site.cfg.py.in
26

Yes, but you need to be able to type llvm-lit.py path/to/debuginfo-tests, and if you do that, lit is going to be looking specifically for a lit.cfg.py and won't find it

hintonda updated this revision to Diff 126289.Dec 9 2017, 9:18 PM
  • Change name back to lit.cfg.py, and handle config.clang_src_dir.
hintonda added inline comments.Dec 9 2017, 9:36 PM
lit.site.cfg.py.in
26

Changing the name back to lit.cfg.py was required for the monorepo, but also required a change to clang, D41055, which needs to land first -- hope I set the dependency correctly.

This revision was automatically updated to reflect the committed changes.