[Lldb-commits] [lldb] d6a5cce - [lldb/Test] Fix skipTestIfFn for fucntions that return a value

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 3 19:57:08 PDT 2020


Author: Jonas Devlieghere
Date: 2020-08-03T19:56:12-07:00
New Revision: d6a5cce0e7d65562f081569a61595e53cdb8d5d0

URL: https://github.com/llvm/llvm-project/commit/d6a5cce0e7d65562f081569a61595e53cdb8d5d0
DIFF: https://github.com/llvm/llvm-project/commit/d6a5cce0e7d65562f081569a61595e53cdb8d5d0.diff

LOG: [lldb/Test] Fix skipTestIfFn for fucntions that return a value

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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 8c8f2509a863..873952e4c91a 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -132,7 +132,7 @@ def wrapper(*args, **kwargs):
             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)


        


More information about the lldb-commits mailing list