summaryrefslogtreecommitdiffstats
path: root/lldb/test/help/TestHelp.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-07-01 22:52:57 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-07-01 22:52:57 +0000
commit119b53ea6d5c6a603bd1a95006f807d8f24a05bb (patch)
treef163e4d7b889a7e25ad5906f56750147c5491828 /lldb/test/help/TestHelp.py
parente71eddac5937c0742e5808559a5b4795dcb9418f (diff)
downloadbcm5719-llvm-119b53ea6d5c6a603bd1a95006f807d8f24a05bb.tar.gz
bcm5719-llvm-119b53ea6d5c6a603bd1a95006f807d8f24a05bb.zip
Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is
is defined. Use ${LLDB_LOG} to specify the log file. Create a singleton SBDebugger in the lldb namespace, that gets used when running the entire test suite. llvm-svn: 107445
Diffstat (limited to 'lldb/test/help/TestHelp.py')
-rw-r--r--lldb/test/help/TestHelp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/test/help/TestHelp.py b/lldb/test/help/TestHelp.py
index fbfdc8ca25b..0cf7ddb2ba4 100644
--- a/lldb/test/help/TestHelp.py
+++ b/lldb/test/help/TestHelp.py
@@ -4,15 +4,19 @@ import os, time
import lldb
import unittest
+main = False
+
class TestHelpCommand(unittest.TestCase):
def setUp(self):
+ global main
+
# Save old working directory.
self.oldcwd = os.getcwd()
# Change current working directory if ${LLDB_TEST} is defined.
if ("LLDB_TEST" in os.environ):
os.chdir(os.path.join(os.environ["LLDB_TEST"], "help"));
- self.dbg = lldb.SBDebugger.Create()
+ self.dbg = lldb.SBDebugger.Create() if main else lldb.DBG
if not self.dbg.IsValid():
raise Exception('Invalid debugger instance')
self.dbg.SetAsync(False)
@@ -23,6 +27,7 @@ class TestHelpCommand(unittest.TestCase):
def tearDown(self):
# Restore old working directory.
os.chdir(self.oldcwd)
+ del self.dbg
def test_simplehelp(self):
"""A simple test of 'help' command and its output."""
@@ -48,5 +53,6 @@ class TestHelpCommand(unittest.TestCase):
if __name__ == '__main__':
lldb.SBDebugger.Initialize()
+ main = True
unittest.main()
lldb.SBDebugger.Terminate()
OpenPOWER on IntegriCloud