From ef4fa44ab86b8bb84b579f0fea37c014b3d00df1 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Fri, 4 Dec 2015 19:50:05 +0000 Subject: Fix an issue where all tests marked with skip_if_callable would be skipped regardless of the actual callable llvm-svn: 254758 --- lldb/packages/Python/lldbsuite/test/lldbutil.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/lldbutil.py') diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py index 5521b80200f..6b242564ff0 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py @@ -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): -- cgit v1.2.3