summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/command_script
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/functionalities/command_script')
-rw-r--r--lldb/test/functionalities/command_script/TestCommandScript.py10
-rw-r--r--lldb/test/functionalities/command_script/import/TestImport.py10
-rw-r--r--lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py9
3 files changed, 6 insertions, 23 deletions
diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py
index 40d0b694fa9..b8a891630c3 100644
--- a/lldb/test/functionalities/command_script/TestCommandScript.py
+++ b/lldb/test/functionalities/command_script/TestCommandScript.py
@@ -2,8 +2,9 @@
Test lldb Python commands.
"""
+import lldb_shared
+
import os, time
-import unittest2
import lldb
from lldbtest import *
@@ -137,10 +138,3 @@ class CmdPythonTestCase(TestBase):
self.runCmd('command script add -f bug11569 bug11569')
# This should not crash.
self.runCmd('bug11569', check=False)
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
-
diff --git a/lldb/test/functionalities/command_script/import/TestImport.py b/lldb/test/functionalities/command_script/import/TestImport.py
index a00db8e7dfe..f413bdc4baa 100644
--- a/lldb/test/functionalities/command_script/import/TestImport.py
+++ b/lldb/test/functionalities/command_script/import/TestImport.py
@@ -1,7 +1,8 @@
"""Test custom import command to import files by path."""
+import lldb_shared
+
import os, sys, time
-import unittest2
import lldb
from lldbtest import *
@@ -68,10 +69,3 @@ class ImportTestCase(TestBase):
substrs = ['barutil says', 'bar told me', 'hello'])
self.expect("foobarcmd hello",
substrs = ['foobar says', 'hello'])
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
index 17368197e0b..4b19386379b 100644
--- a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
+++ b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
@@ -1,7 +1,8 @@
"""Check that we handle an ImportError in a special way when command script importing files."""
+import lldb_shared
+
import os, sys, time
-import unittest2
import lldb
from lldbtest import *
@@ -26,9 +27,3 @@ class Rdar12586188TestCase(TestBase):
error=True, substrs = ['raise ImportError("I do not want to be imported")'])
self.expect("command script import ./fail212586188.py --allow-reload",
error=True, substrs = ['raise ValueError("I do not want to be imported")'])
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
OpenPOWER on IntegriCloud