This is an archive of the discontinued LLVM Phabricator instance.

Remove TestMyFirstWatchpoint and TestStepOverWatchpoint from basic_process category
ClosedPublic

Authored by labath on Nov 1 2017, 3:35 PM.

Details

Summary

Does anyone care about these tests being in the basic_process category?
The getCategories function is interfering with the filesystem-based
watchpoint category kicking in. If there's any interest in keeping it,
then I can certainly make it happen. However, I haven't seen anyone
using these, so I'm thinking, if that's the case, why bother?

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Nov 1 2017, 3:35 PM
clayborg edited edge metadata.Nov 1 2017, 3:37 PM

No objections from me as I don't use these categories.

jingham edited edge metadata.Nov 1 2017, 3:55 PM

Setting categories on directories seems much less useful if you then have to scan through all the tests and see if any of the tests in the directories you've added categories to implement getCategories then add the new category to the return from getCategories list as well.

So it seems to me either getCategories should add to the directory category list that's already been computed, or we should remove it altogether.

There are only a few other tests that implement getCategories (all to set it to basic_process). So it does look like this is more degrees of freedom than we actually need. Maybe we should just remove it altogether? I don't feel too strongly, but if we're going to remove it from these tests we should probably remove it everywhere or we'll make somebody else have to figure this out again down the line.

labath added a comment.Nov 2 2017, 5:20 AM

I agree that we have too many ways of specifying categories. I think that the file-based and getCategories() way are redundant, particularly, as we tend to only have one test file per directory anyway. For very fine grained annotations, we can use the @add_test_categories decorator (which is already cumulative). I'll put up a patch to remove getCategories().

labath updated this revision to Diff 121287.Nov 2 2017, 5:23 AM

This removes the getCategories function altogether. I've moved the
filesystem-based category computation (which was implemented as a getCategories
base case) into the consumer, so that it is impossible to override. I've
converted the existing getCategories usages to either @add_test_categories (if
they affected a single test) or to .categories.

clayborg accepted this revision.Nov 2 2017, 9:14 AM
This revision is now accepted and ready to land.Nov 2 2017, 9:14 AM
jingham accepted this revision.Nov 2 2017, 10:53 AM

Very nice, thanks!

This revision was automatically updated to reflect the committed changes.