This is an archive of the discontinued LLVM Phabricator instance.

Allow ExpectedFailure* decorators to work with optional arguments
ClosedPublic

Authored by chying on Mar 24 2015, 4:25 PM.

Details

Summary

-if the decorator functions called with optional arguments, return decorator to original method

Diff Detail

Event Timeline

chying updated this revision to Diff 22613.Mar 24 2015, 4:25 PM
chying retitled this revision from to Allow ExpectedFailure* decorators to work with optional arguments.
chying updated this object.
chying edited the test plan for this revision. (Show Details)
chying added a subscriber: Unknown Object (MLST).
chaoren edited edge metadata.Mar 24 2015, 4:50 PM

Can't you get rid of the if bugnumber: and just check for bugnumber is None inside expectedFailure()?

emaste added a subscriber: emaste.Mar 24 2015, 5:47 PM
chying updated this object.Mar 26 2015, 4:26 PM
chying edited edge metadata.
chying updated this revision to Diff 22769.Mar 26 2015, 4:30 PM

Sorry for the delay. Had to spend some time to understand decorator in Python.
As suggested by Chaoren, removed bugnumber check from all caller functions, and handle None case in expectedFailure.

chaoren accepted this revision.Mar 26 2015, 5:04 PM
chaoren edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 26 2015, 5:04 PM
chaoren added inline comments.Mar 26 2015, 5:38 PM
test/lldbtest.py
553

Nit: "so it will be used to decorate original method"

chying closed this revision.Apr 6 2015, 7:39 PM

Submitted