This is an archive of the discontinued LLVM Phabricator instance.

Port the python api decorator to use test categories
ClosedPublic

Authored by labath on Oct 23 2015, 7:17 AM.

Details

Summary

Per discussions on the mailing list, I have implemented a decorator which annotates individual
test methods with categories. I have used this framework to replace the '-a' and '+a'
command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test
decorator (now @categories('pyapi')). The test suite now gives an error message suggesting the
new options if the user specifies the deprecated +/-a switches. If the general direction is good,
I will follow this up with other switches.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 38235.Oct 23 2015, 7:17 AM
labath retitled this revision from to Port the python api decorator to use test categories.
labath updated this object.
labath added a subscriber: lldb-commits.
zturner edited edge metadata.Oct 23 2015, 9:46 AM

Could you call this something less generic than categories? The name of the decorator should be descriptive enough to hint that it can only be applied to test methods. test_categories even.

test_categories is the name of .py file. :/ How about add_test_categories ?

Yea that sounds good too.

tfiala accepted this revision.Oct 24 2015, 7:58 AM
tfiala edited edge metadata.

I like it.

This revision is now accepted and ready to land.Oct 24 2015, 7:58 AM
This revision was automatically updated to reflect the committed changes.