Author: enrico
Date: Fri Dec 4 13:50:05 2015
New Revision: 254758
URL: http://llvm.org/viewvc/llvm-project?rev=254758&view=rev
Log:
Fix an issue where all tests marked with skip_if_callable would be skipped
regardless of the actual callable
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py?rev=254758&r1=254757&r2=254758&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py Fri Dec 4 13:50:05
2015
@@ -985,10 +985,11 @@ class PrintableRegex(object):
def __repr__(self):
return "re.compile(%s) -> %s" % (self.text, self.regex)
-def skip_if_callable(test, callable, reason):
- if six.callable(test):
- test.skipTest(reason)
- return True
+def skip_if_callable(test, mycallable, reason):
+ if six.callable(mycallable):
+ if mycallable(test):
+ test.skipTest(reason)
+ return True
return False
def skip_if_library_missing(test, target, library):
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits