diff options
8 files changed, 15 insertions, 9 deletions
diff --git a/lldb/test/benchmarks/disassembly/TestDisassembly.py b/lldb/test/benchmarks/disassembly/TestDisassembly.py index e77e5d22836..126d5e6a62b 100644 --- a/lldb/test/benchmarks/disassembly/TestDisassembly.py +++ b/lldb/test/benchmarks/disassembly/TestDisassembly.py @@ -43,7 +43,7 @@ class DisassembleDriverMainLoop(BenchBase): prompt = self.child_prompt # So that the child gets torn down after the test. - self.child = pexpect.spawn('%s %s' % (self.lldbExec, exe)) + self.child = pexpect.spawn('%s %s %s' % (self.lldbExec, self.lldbOption, exe)) child = self.child # Turn on logging for what the child sends back. @@ -83,7 +83,7 @@ class DisassembleDriverMainLoop(BenchBase): prompt = self.child_prompt # So that the child gets torn down after the test. - self.child = pexpect.spawn('gdb %s' % exe) + self.child = pexpect.spawn('gdb --nx %s' % exe) child = self.child # Turn on logging for what the child sends back. diff --git a/lldb/test/benchmarks/disassembly/TestFlintVsSlateGDBDisassembly.py b/lldb/test/benchmarks/disassembly/TestFlintVsSlateGDBDisassembly.py index 621d83869e6..c1403b852ff 100644 --- a/lldb/test/benchmarks/disassembly/TestFlintVsSlateGDBDisassembly.py +++ b/lldb/test/benchmarks/disassembly/TestFlintVsSlateGDBDisassembly.py @@ -49,7 +49,7 @@ class FlintVsSlateGDBDisassembly(BenchBase): prompt = self.child_prompt # So that the child gets torn down after the test. - self.child = pexpect.spawn('%s %s' % (gdb_exe_path, exe)) + self.child = pexpect.spawn('%s --nx %s' % (gdb_exe_path, exe)) child = self.child # Turn on logging for what the child sends back. diff --git a/lldb/test/benchmarks/example/TestRepeatedExprs.py b/lldb/test/benchmarks/example/TestRepeatedExprs.py index 0e385e17054..f6c3763e0f3 100644 --- a/lldb/test/benchmarks/example/TestRepeatedExprs.py +++ b/lldb/test/benchmarks/example/TestRepeatedExprs.py @@ -38,7 +38,7 @@ class RepeatedExprsCase(BenchBase): prompt = self.child_prompt # So that the child gets torn down after the test. - self.child = pexpect.spawn('%s %s' % (self.lldbExec, exe)) + self.child = pexpect.spawn('%s %s %s' % (self.lldbExec, self.lldbOption, exe)) child = self.child # Turn on logging for what the child sends back. @@ -83,7 +83,7 @@ class RepeatedExprsCase(BenchBase): prompt = self.child_prompt # So that the child gets torn down after the test. - self.child = pexpect.spawn('gdb %s' % exe) + self.child = pexpect.spawn('gdb --nx %s' % exe) child = self.child # Turn on logging for what the child sends back. diff --git a/lldb/test/functionalities/command_regex/TestCommandRegex.py b/lldb/test/functionalities/command_regex/TestCommandRegex.py index a404de19dcc..3cc34ac0ae0 100644 --- a/lldb/test/functionalities/command_regex/TestCommandRegex.py +++ b/lldb/test/functionalities/command_regex/TestCommandRegex.py @@ -18,7 +18,7 @@ class CommandRegexTestCase(TestBase): regex_prompt = "Enter regular expressions in the form 's/<regex>/<subst>/' and terminate with an empty line:\r\n" regex_prompt1 = "\r\n" - child = pexpect.spawn('%s' % self.lldbHere) + child = pexpect.spawn('%s %s' % (self.lldbHere, self.lldbOption)) # Turn on logging for what the child sends back. if self.TraceOn(): child.logfile_read = sys.stdout diff --git a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py index d407d8dda87..edae42350ef 100644 --- a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py +++ b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py @@ -34,7 +34,7 @@ class ConvenienceVariablesCase(TestBase): python_prompt = ">>> " # So that the child gets torn down after the test. - self.child = pexpect.spawn('%s %s' % (self.lldbHere, exe)) + self.child = pexpect.spawn('%s %s %s' % (self.lldbHere, self.lldbOption, exe)) child = self.child # Turn on logging for what the child sends back. if self.TraceOn(): diff --git a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py index d04aaa88213..466ce5a1e4f 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py @@ -40,7 +40,7 @@ class StopHookMechanismTestCase(TestBase): add_prompt1 = "\r\n> " # So that the child gets torn down after the test. - self.child = pexpect.spawn('%s %s' % (self.lldbHere, exe)) + self.child = pexpect.spawn('%s %s %s' % (self.lldbHere, self.lldbOption, exe)) child = self.child # Turn on logging for what the child sends back. if self.TraceOn(): diff --git a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py index bd70119d9bc..8aad81c9b4f 100644 --- a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py +++ b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py @@ -43,7 +43,7 @@ class StopHookForMultipleThreadsTestCase(TestBase): prompt = "(lldb) " # So that the child gets torn down after the test. - self.child = pexpect.spawn('%s %s' % (self.lldbHere, exe)) + self.child = pexpect.spawn('%s %s %s' % (self.lldbHere, self.lldbOption, exe)) child = self.child # Turn on logging for what the child sends back. if self.TraceOn(): diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index cbddc289a9e..79923cb2a10 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -484,6 +484,12 @@ class Base(unittest2.TestCase): self.lldbHere = os.environ["LLDB_HERE"] else: self.lldbHere = None + # If we spawn an lldb process for test (via pexpect), do not load the + # init file unless told otherwise. + if "NO_LLDBINIT" in os.environ and "NO" == os.environ["NO_LLDBINIT"]: + self.lldbOption = "" + else: + self.lldbOption = "--no-lldbinit" # Assign the test method name to self.testMethodName. # |