This is an archive of the discontinued LLVM Phabricator instance.

Clean up layout of ASTMerge tests
ClosedPublic

Authored by spyffe on Nov 11 2016, 4:34 PM.

Details

Reviewers
a.sidorin
beanz
Summary

As outlined in a previous RFC, the test/ASTMerge/Inputs folder is getting full and the tests are starting to become interdependent. This is undesirable because

  • it makes it harder to write new tests
  • it makes it harder to figure out at a glance what old tests are doing, and
  • it adds the risk of breaking one test while changing a different one, because of the interdependencies.

To fix this, according to the conversation in the RFC, I have changed the layout from

a.c
Inputs/a1.c
Inputs/a2.c

to

a/test.c
a/a1.c
a/a2.c

for all existing tests. I have also eliminated interdependencies (by replicating the input files for each test that uses them) and made a little lit.cfg that makes sure that lit only processes test.c/test.m/test.cpp/test.mm.

Diff Detail

Repository
rL LLVM

Event Timeline

spyffe updated this revision to Diff 77700.Nov 11 2016, 4:34 PM
spyffe retitled this revision from to Clean up layout of ASTMerge tests.
spyffe updated this object.
spyffe added a reviewer: a.sidorin.
spyffe set the repository for this revision to rL LLVM.
spyffe added a subscriber: cfe-commits.
a.sidorin accepted this revision.Nov 14 2016, 4:03 AM
a.sidorin edited edge metadata.

Looks good, thank you!

This revision is now accepted and ready to land.Nov 14 2016, 4:03 AM
spyffe updated this revision to Diff 77928.Nov 14 2016, 5:35 PM
spyffe added a reviewer: beanz.

Updated the locations so the structure is now

a/test.c
a/Inputs/a1.c
a/Inputs/a2.c

The naming of "test.c" is no longer a requirement but only a convention. Also lit.site.cfg is no longer required because we no longer do anything unusual from lit's perspective.

@spyffe : It seems to be OK.

beanz accepted this revision.Nov 15 2016, 10:14 AM
beanz edited edge metadata.

LGTM! Thanks for doing this Sean!

spyffe closed this revision.Nov 16 2016, 10:31 AM

Committed r287129

./typedef.c