[lldb/Test] Fix skipTestIfFn for fucntions that return a value
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 4 Aug 2020 02:56:10 +0000 (19:56 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 4 Aug 2020 02:56:12 +0000 (19:56 -0700)
Sometimes the decorator is used on a common function rather than the
test method, which can return a value. This fails with decorators that
use skipTestIfFn under the hood.

lldb/packages/Python/lldbsuite/test/decorators.py

index 8c8f250..873952e 100644 (file)
@@ -132,7 +132,7 @@ def skipTestIfFn(expected_fn, bugnumber=None):
             if reason is not None:
                 self.skipTest(reason)
             else:
-                func(*args, **kwargs)
+                return func(*args, **kwargs)
         return wrapper
 
     # Some decorators can be called both with no arguments (e.g. @expectedFailureWindows)