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

Fixes the UnboundLocalError for the local variables out, err and
exitCode when a timeout is hit.
This commit is contained in:
Jonas Devlieghere 2020-01-30 21:23:58 -08:00
parent a5f479473b
commit 196b31f9f1
1 changed files with 4 additions and 1 deletions

View File

@ -92,7 +92,10 @@ class LLDBTest(TestFormat):
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)