Added a utility function EnvArray() to lldbtest.py.

llvm-svn: 112223
This commit is contained in:
Johnny Chen 2010-08-26 21:49:29 +00:00
parent e14ae4ec24
commit 27c412320e
2 changed files with 7 additions and 0 deletions

View File

@ -67,6 +67,7 @@ class TestArrayTypes(TestBase):
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
self.runCmd("run", RUN_STOPPED)
#process = target.LaunchProcess([''], [''], os.ctermid(), False)
# The stop reason of the thread should be breakpoint.
thread = target.GetProcess().GetThreadAtIndex(0)

View File

@ -171,6 +171,12 @@ def Enum(stopReason):
else:
raise Exception("Unknown stopReason string")
#
# Returns an env variable array from the os.environ map object.
#
def EnvArray():
return map(lambda k,v: k+"="+v, os.environ.keys(), os.environ.values())
class TestBase(unittest2.TestCase):
"""This LLDB abstract base class is meant to be subclassed."""