Rebase against ToT

http://reviews.llvm.org/D8207

Files:
  test/dotest.py
  test/tools/lldb-mi/breakpoint/TestMiBreak.py
  test/tools/lldb-mi/control/TestMiExec.py
  test/tools/lldb-mi/data/TestMiData.py
  test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
  test/tools/lldb-mi/signal/TestMiSignal.py
  test/tools/lldb-mi/stack/TestMiStack.py
  test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
  test/tools/lldb-mi/symbol/TestMiSymbol.py
  test/tools/lldb-mi/syntax/TestMiSyntax.py
  test/tools/lldb-mi/variable/TestMiVar.py
  test/tools/lldb-server/commandline/TestStubReverseConnect.py
  test/tools/lldb-server/commandline/TestStubSetSID.py
  test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
  test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
  test/tools/lldb-server/test/test_lldbgdbserverutils.py

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: test/dotest.py
===================================================================
--- test/dotest.py
+++ test/dotest.py
@@ -932,14 +932,20 @@
 
     pluginPath = os.path.join(scriptPath, 'plugins')
     pexpectPath = os.path.join(scriptPath, 'pexpect-2.4')
+    toolsLldbMiPath = os.path.join(scriptPath, 'tools', 'lldb-mi')
+    toolsLldbServerPath = os.path.join(scriptPath, 'tools', 'lldb-server')
 
     # Put embedded pexpect at front of the load path so we ensure we
     # use that version.
     sys.path.insert(0, pexpectPath)
 
-    # Append script dir and plugin dir to the sys.path.
+    # Append script dir, plugin dir, lldb-mi dir and lldb-server dir to the sys.path.
     sys.path.append(scriptPath)
     sys.path.append(pluginPath)
+    sys.path.append(toolsLldbMiPath)     # Adding test/tools/lldb-mi to the path makes it easy
+                                         # to "import lldbmi_testcase" from the MI tests
+    sys.path.append(toolsLldbServerPath) # Adding test/tools/lldb-server to the path makes it easy
+                                         # to "import lldbgdbserverutils" from the lldb-server tests
 
     # This is our base name component.
     base = os.path.abspath(os.path.join(scriptPath, os.pardir))
Index: test/tools/lldb-mi/breakpoint/TestMiBreak.py
===================================================================
--- test/tools/lldb-mi/breakpoint/TestMiBreak.py
+++ test/tools/lldb-mi/breakpoint/TestMiBreak.py
@@ -2,10 +2,6 @@
 Test lldb-mi -break-xxx commands.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/control/TestMiExec.py
===================================================================
--- test/tools/lldb-mi/control/TestMiExec.py
+++ test/tools/lldb-mi/control/TestMiExec.py
@@ -2,10 +2,6 @@
 Test lldb-mi -exec-xxx commands.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/data/TestMiData.py
===================================================================
--- test/tools/lldb-mi/data/TestMiData.py
+++ test/tools/lldb-mi/data/TestMiData.py
@@ -2,10 +2,6 @@
 Test lldb-mi -data-xxx commands.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
===================================================================
--- test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
+++ test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
@@ -2,10 +2,6 @@
 Test lldb-mi -interpreter-exec command.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/signal/TestMiSignal.py
===================================================================
--- test/tools/lldb-mi/signal/TestMiSignal.py
+++ test/tools/lldb-mi/signal/TestMiSignal.py
@@ -2,10 +2,6 @@
 Test that the lldb-mi handles signals properly.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
@@ -90,7 +86,6 @@
         """Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (remote)."""
 
         # Prepare debugserver
-        sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "lldb-server")))
         import lldbgdbserverutils
         debugserver_exe = lldbgdbserverutils.get_debugserver_exe()
         if not debugserver_exe:
@@ -167,7 +162,6 @@
         """Test that 'lldb-mi --interpreter' notifies after it was stopped when segfault occurred (remote)."""
 
         # Prepare debugserver
-        sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "lldb-server")))
         import lldbgdbserverutils
         debugserver_exe = lldbgdbserverutils.get_debugserver_exe()
         if not debugserver_exe:
Index: test/tools/lldb-mi/stack/TestMiStack.py
===================================================================
--- test/tools/lldb-mi/stack/TestMiStack.py
+++ test/tools/lldb-mi/stack/TestMiStack.py
@@ -2,10 +2,6 @@
 Test lldb-mi -stack-xxx commands.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
===================================================================
--- test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
+++ test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
@@ -2,10 +2,6 @@
 Test lldb-mi startup options.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/symbol/TestMiSymbol.py
===================================================================
--- test/tools/lldb-mi/symbol/TestMiSymbol.py
+++ test/tools/lldb-mi/symbol/TestMiSymbol.py
@@ -2,10 +2,6 @@
 Test lldb-mi -symbol-xxx commands.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/syntax/TestMiSyntax.py
===================================================================
--- test/tools/lldb-mi/syntax/TestMiSyntax.py
+++ test/tools/lldb-mi/syntax/TestMiSyntax.py
@@ -2,10 +2,6 @@
 Test that the lldb-mi driver understands MI command syntax.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-mi/variable/TestMiVar.py
===================================================================
--- test/tools/lldb-mi/variable/TestMiVar.py
+++ test/tools/lldb-mi/variable/TestMiVar.py
@@ -2,10 +2,6 @@
 Test lldb-mi -var-xxx commands.
 """
 
-# adjust path for lldbmi_testcase.py
-import sys, os.path
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
 import lldbmi_testcase
 from lldbtest import *
 import unittest2
Index: test/tools/lldb-server/commandline/TestStubReverseConnect.py
===================================================================
--- test/tools/lldb-server/commandline/TestStubReverseConnect.py
+++ test/tools/lldb-server/commandline/TestStubReverseConnect.py
@@ -1,9 +1,3 @@
-# Add the directory above ours to the python library path since we
-# will import from there.
-import os.path
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
-
 import gdbremote_testcase
 import re
 import select
Index: test/tools/lldb-server/commandline/TestStubSetSID.py
===================================================================
--- test/tools/lldb-server/commandline/TestStubSetSID.py
+++ test/tools/lldb-server/commandline/TestStubSetSID.py
@@ -1,11 +1,5 @@
 import unittest2
 
-# Add the directory above ours to the python library path since we
-# will import from there.
-import os.path
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
-
 import gdbremote_testcase
 import os
 import select
Index: test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
===================================================================
--- test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
+++ test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
@@ -1,11 +1,5 @@
 import unittest2
 
-# Add the directory above ours to the python library path since we
-# will import from there.
-import os.path
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
-
 import gdbremote_testcase
 import signal
 from lldbtest import *
Index: test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
===================================================================
--- test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
+++ test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
@@ -1,11 +1,5 @@
 import unittest2
 
-# Add the directory above ours to the python library path since we
-# will import from there.
-import os.path
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
-
 import gdbremote_testcase
 import signal
 from lldbtest import *
Index: test/tools/lldb-server/test/test_lldbgdbserverutils.py
===================================================================
--- test/tools/lldb-server/test/test_lldbgdbserverutils.py
+++ test/tools/lldb-server/test/test_lldbgdbserverutils.py
@@ -2,12 +2,8 @@
 import re
 import sys
 
-# adjust path for embedded unittest2
-sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', '..'))
 import unittest2
 
-# adjust path for lldbgdbserverutils.py
-sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
 from lldbgdbserverutils import *
 
 
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to