labath added a comment.

I am confused as to how could this even work, since all your decorators seem to 
be ignoring the function they are decorating. I'm pretty sure this is going to 
cause some very weird things to happen things to come out of the decoration 
process, which might explain your confusion. Try giving it a go by passing the 
function explicitly.


================
Comment at: packages/Python/lldbsuite/test/lldbtest.py:560
@@ -559,3 +559,1 @@
     """Decorate the item as a debugserver test."""
-    if isinstance(func, type) and issubclass(func, unittest2.TestCase):
-        raise Exception("@debugserver_test can only be used to decorate a test 
method")
----------------
Please don't remove these. They make sure that you do not attempt to apply this 
decorator to a class. If the decorator is not ready for that (and the current 
skipIfTestFn does not appear to be), it will just cause the whole cause the 
whole class to be silently ignored (we've had this happen before).

I think it's ok to centralize the check in skipTestIfFn.

================
Comment at: packages/Python/lldbsuite/test/lldbtest.py:562
@@ -571,1 +561,3 @@
+        return (configuration.dont_do_debugserver_test, "debugserver tests")
+    return skipTestIfFn(should_skip_debugserver_tests)
 
----------------
You have dropped "func" completely here. Should this be 
`skipTestIfFn(should_skip_debugserver_tests, func)`? (Same goes for other 
decorators.)


http://reviews.llvm.org/D16741



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to