[Lldb-commits] [lldb] 196b31f - [lldb/Lit] Fix UnboundLocalError when reaching a timeout.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 30 21:24:52 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-30T21:23:58-08:00
New Revision: 196b31f9f19d743f55fa70744ddfd2f85d6ad117

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

LOG: [lldb/Lit] Fix UnboundLocalError when reaching a timeout.

Fixes the UnboundLocalError for the local variables out, err and
exitCode when a timeout is hit.

Added: 
    

Modified: 
    lldb/test/API/lldbtest.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py
index 864d5ea1df03..65aafab5c617 100644
--- a/lldb/test/API/lldbtest.py
+++ b/lldb/test/API/lldbtest.py
@@ -92,7 +92,10 @@ def execute(self, test, litConfig):
                 cmd,
                 env=test.config.environment,
                 timeout=litConfig.maxIndividualTestTime)
-        except lit.util.ExecuteCommandTimeoutException:
+        except lit.util.ExecuteCommandTimeoutException as e:
+            out = e.out
+            err = e.err
+            exitCode = e.exitCode
             timeoutInfo = 'Reached timeout of {} seconds'.format(
                 litConfig.maxIndividualTestTime)
 


        


More information about the lldb-commits mailing list