mgorny added a comment.

I suppose you need to make the timeout branch entirely separate from the 
non-timeout branch, as the variable assignment does not take place then.



================
Comment at: lldb/test/API/lldbtest.py:100
+        output = """Script:\n--\n%s\n--\nExit Code: %d\n""" % (
+            ' '.join(cmd), exitCode)
+        if timeoutInfo is not None:
----------------
This crashes on timeout since `exitCode` is not declared:

```
UNRESOLVED: lldb-api :: tools/lldb-vscode/variables/TestVSCode_variables.py 
(1906 of 1907)
******************** TEST 'lldb-api :: 
tools/lldb-vscode/variables/TestVSCode_variables.py' FAILED ********************
Exception during script execution:
Traceback (most recent call last):
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/worker.py", line 91, in 
_execute_test_handle_errors
    return _adapt_result(test.config.test_format.execute(test, lit_config))
  File "/home/mgorny/llvm-project/llvm/tools/lldb/test/API/lldbtest.py", line 
100, in execute
    ' '.join(cmd), exitCode)
UnboundLocalError: local variable 'exitCode' referenced before assignment
```


================
Comment at: lldb/test/API/lldbtest.py:105
+
+        if out:
+            output += """Command Output (stdout):\n--\n%s\n--\n""" % (out,)
----------------
I suppose this will crash as well, and below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73384/new/

https://reviews.llvm.org/D73384



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to