This newly introduced test file (for debugging purpose) needs to handle the case
where the environment variables for log files (DEBUG_LLDB_LOG and DEBUG_GDB_REMOTE_LOG)
are not defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133603 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/types/TestFailures.py b/test/types/TestFailures.py
index ef1e257..01a1a4a 100644
--- a/test/types/TestFailures.py
+++ b/test/types/TestFailures.py
@@ -19,11 +19,16 @@
TestBase.setUp(self)
# If we're lucky, test_long_type_with_dsym fails.
# Let's turn on logging just for that.
- if "test_long_type_with_dsym" in self.id():
- self.runCmd(
- "log enable -n -f %s lldb commands event process state" % os.environ["DEBUG_LLDB_LOG"])
- self.runCmd(
- "log enable -n -f %s gdb-remote packets process" % os.environ["DEBUG_GDB_REMOTE_LOG"])
+ try:
+ if "test_long_type_with_dsym" in self.id():
+ self.runCmd(
+ "log enable -n -f %s lldb commands event process state" %
+ os.environ["DEBUG_LLDB_LOG"])
+ self.runCmd(
+ "log enable -n -f %s gdb-remote packets process" %
+ os.environ["DEBUG_GDB_REMOTE_LOG"])
+ except:
+ pass
def tearDown(self):
# Call super's tearDown().