Author: zturner Date: Thu Jul 17 20:02:02 2014 New Revision: 213343 URL: http://llvm.org/viewvc/llvm-project?rev=213343&view=rev Log: Fixes a number of issue related to test portability on Windows.
99% of this CL is simply moving calls to "import pexpect" to a more narrow scope - i.e. the function that actually runs a particular test. This way the test suite can run on Windows, which doesn't have pexpect, and the individual tests that use pexpect can be disabled on a platform-specific basis. Additionally, this CL fixes a few other cases of non-portability. Notably, using "ps" to get the command line, and os.uname() to determine the architecture don't work on Windows. Finally, this also adds a stubbed out builder_win32 module. The full test suite runs correctly on Windows after this CL, although there is still some work remaining on the C++ side to fix one-shot script commands from LLDB (e.g. script print "foo"), which currently deadlock. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4573 Added: lldb/trunk/test/plugins/builder_win32.py Modified: lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py lldb/trunk/test/benchmarks/startup/TestStartupDelays.py lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py lldb/trunk/test/dotest.py lldb/trunk/test/functionalities/command_history/TestCommandHistory.py lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py lldb/trunk/test/functionalities/completion/TestCompletion.py lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py lldb/trunk/test/python_api/sbdata/TestSBData.py lldb/trunk/test/settings/TestSettings.py lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py Modified: lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py (original) +++ lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * def is_exe(fpath): @@ -66,6 +65,7 @@ class DisassembleDriverMainLoop(BenchBas print "lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg) def run_lldb_disassembly(self, exe, function, count): + import pexpect # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' prompt = self.child_prompt @@ -106,6 +106,7 @@ class DisassembleDriverMainLoop(BenchBas self.child = None def run_gdb_disassembly(self, exe, function, count): + import pexpect # Set self.child_prompt, which is "(gdb) ". self.child_prompt = '(gdb) ' prompt = self.child_prompt Modified: lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py (original) +++ lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ inferior and traverses the stack for thr import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class AttachThenDisassemblyBench(BenchBase): Modified: lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py (original) +++ lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class XCode41Vs42GDBDisassembly(BenchBase): @@ -47,6 +46,7 @@ class XCode41Vs42GDBDisassembly(BenchBas print "gdb_42_avg/gdb_41_avg: %f" % (self.gdb_42_avg/self.gdb_41_avg) def run_gdb_disassembly(self, gdb_exe_path, exe, function, count): + import pexpect # Set self.child_prompt, which is "(gdb) ". self.child_prompt = '(gdb) ' prompt = self.child_prompt Modified: lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py (original) +++ lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class ExpressionEvaluationCase(BenchBase): @@ -29,6 +28,7 @@ class ExpressionEvaluationCase(BenchBase print "lldb expr cmd benchmark:", self.stopwatch def run_lldb_repeated_exprs(self, exe_name, count): + import pexpect exe = os.path.join(os.getcwd(), exe_name) # Set self.child_prompt, which is "(lldb) ". Modified: lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py (original) +++ lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class RepeatedExprsCase(BenchBase): @@ -34,6 +33,7 @@ class RepeatedExprsCase(BenchBase): print "lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg) def run_lldb_repeated_exprs(self, exe_name, count): + import pexpect exe = os.path.join(os.getcwd(), exe_name) # Set self.child_prompt, which is "(lldb) ". @@ -79,6 +79,7 @@ class RepeatedExprsCase(BenchBase): self.child = None def run_gdb_repeated_exprs(self, exe_name, count): + import pexpect exe = os.path.join(os.getcwd(), exe_name) # Set self.child_prompt, which is "(gdb) ". Modified: lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py (original) +++ lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class FrameVariableResponseBench(BenchBase): @@ -33,6 +32,7 @@ class FrameVariableResponseBench(BenchBa print "lldb frame variable benchmark:", self.stopwatch def run_frame_variable_bench(self, exe, break_spec, count): + import pexpect # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' prompt = self.child_prompt Modified: lldb/trunk/test/benchmarks/startup/TestStartupDelays.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/startup/TestStartupDelays.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/startup/TestStartupDelays.py (original) +++ lldb/trunk/test/benchmarks/startup/TestStartupDelays.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class StartupDelaysBench(BenchBase): @@ -40,6 +39,7 @@ class StartupDelaysBench(BenchBase): print "lldb startup delay (run to breakpoint) benchmark:", self.stopwatch3 def run_startup_delays_bench(self, exe, break_spec, count): + import pexpect # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' prompt = self.child_prompt Modified: lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py (original) +++ lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class RunHooksThenSteppingsBench(BenchBase): @@ -24,6 +23,7 @@ class RunHooksThenSteppingsBench(BenchBa print "lldb stepping benchmark:", self.stopwatch def run_lldb_runhooks_then_steppings(self, count): + import pexpect # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' prompt = self.child_prompt Modified: lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py (original) +++ lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class SteppingSpeedBench(BenchBase): @@ -36,6 +35,7 @@ class SteppingSpeedBench(BenchBase): print "lldb stepping benchmark:", self.stopwatch def run_lldb_steppings(self, exe, break_spec, count): + import pexpect # Set self.child_prompt, which is "(lldb) ". self.child_prompt = '(lldb) ' prompt = self.child_prompt Modified: lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py (original) +++ lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, sys import unittest2 import lldb -import pexpect from lldbbench import * class CompileRunToBreakpointBench(BenchBase): @@ -33,6 +32,7 @@ class CompileRunToBreakpointBench(BenchB print "lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg) def run_lldb_turnaround(self, exe, function, count): + import pexpect def run_one_round(): prompt = self.child_prompt @@ -73,6 +73,7 @@ class CompileRunToBreakpointBench(BenchB self.child = None def run_gdb_turnaround(self, exe, function, count): + import pexpect def run_one_round(): prompt = self.child_prompt Modified: lldb/trunk/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/dotest.py (original) +++ lldb/trunk/test/dotest.py Thu Jul 17 20:02:02 2014 @@ -1185,10 +1185,7 @@ def lldbLoggings(): raise Exception('log enable failed (check GDB_REMOTE_LOG env variable)') def getMyCommandLine(): - ps = subprocess.Popen([which('ps'), '-o', "command=CMD", str(os.getpid())], stdout=subprocess.PIPE).communicate()[0] - lines = ps.split('\n') - cmd_line = lines[1] - return cmd_line + return ' '.join(sys.argv) # ======================================== # # # Modified: lldb/trunk/test/functionalities/command_history/TestCommandHistory.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_history/TestCommandHistory.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/command_history/TestCommandHistory.py (original) +++ lldb/trunk/test/functionalities/command_history/TestCommandHistory.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test the command history mechanism import os import unittest2 import lldb -import pexpect from lldbtest import * class CommandHistoryTestCase(TestBase): Modified: lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py (original) +++ lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test lldb 'commands regex' command which import os import unittest2 import lldb -import pexpect from lldbtest import * class CommandRegexTestCase(TestBase): @@ -14,6 +13,7 @@ class CommandRegexTestCase(TestBase): def test_command_regex(self): """Test a simple scenario of 'command regex' invocation and subsequent use.""" + import pexpect prompt = "(lldb) " regex_prompt = "Enter one of more sed substitution commands in the form: 's/<regex>/<subst>/'.\r\nTerminate the substitution list with an empty line.\r\n" regex_prompt1 = "\r\n" Modified: lldb/trunk/test/functionalities/completion/TestCompletion.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/completion/TestCompletion.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/completion/TestCompletion.py (original) +++ lldb/trunk/test/functionalities/completion/TestCompletion.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test the lldb command line completion me import os import unittest2 import lldb -import pexpect from lldbtest import * class CommandLineCompletionTestCase(TestBase): @@ -153,6 +152,7 @@ class CommandLineCompletionTestCase(Test def complete_from_to(self, str_input, patterns, turn_off_re_match=False): """Test that the completion mechanism completes str_input to patterns, where patterns could be a pattern-string or a list of pattern-strings""" + import pexpect # Patterns should not be None in order to proceed. self.assertFalse(patterns is None) # And should be either a string or list of strings. Check for list type Modified: lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py (original) +++ lldb/trunk/test/functionalities/connect_remote/TestConnectRemote.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test lldb 'process connect' command. import os import unittest2 import lldb -import pexpect from lldbtest import * class ConnectRemoteTestCase(TestBase): @@ -15,6 +14,7 @@ class ConnectRemoteTestCase(TestBase): def test_connect_remote(self): """Test "process connect connect:://localhost:12345".""" + import pexpect # First, we'll start a fake debugserver (a simple echo server). fakeserver = pexpect.spawn('./EchoServer.py') Modified: lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py (original) +++ lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os import unittest2 import lldb -import pexpect from lldbtest import * class ConvenienceVariablesCase(TestBase): @@ -33,6 +32,7 @@ class ConvenienceVariablesCase(TestBase) def convenience_variables(self): """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.""" + import pexpect exe = os.path.join(os.getcwd(), "a.out") prompt = "(lldb) " python_prompt = ">>> " Modified: lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py (original) +++ lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test the lldb command line takes a filen import os import unittest2 import lldb -import pexpect from lldbtest import * class SingleQuoteInCommandLineTestCase(TestBase): @@ -25,6 +24,7 @@ class SingleQuoteInCommandLineTestCase(T def test_lldb_invocation_with_single_quote_in_filename(self): """Test that 'lldb my_file_name' works where my_file_name is a string with a single quote char in it.""" + import pexpect self.buildDefault() system(["/bin/sh", "-c", "cp a.out \"%s\"" % self.myexe]) Modified: lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py (original) +++ lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test lldb target stop-hook mechanism to import os import unittest2 import lldb -import pexpect from lldbtest import * class StopHookMechanismTestCase(TestBase): @@ -38,6 +37,7 @@ class StopHookMechanismTestCase(TestBase def stop_hook_firing(self): """Test the stop-hook mechanism.""" + import pexpect exe = os.path.join(os.getcwd(), "a.out") prompt = "(lldb) " add_prompt = "Enter your stop hook command(s). Type 'DONE' to end.\r\n> " Modified: lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py (original) +++ lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test that lldb stop-hook works for multi import os, time import unittest2 import lldb -import pexpect from lldbtest import * class StopHookForMultipleThreadsTestCase(TestBase): @@ -42,6 +41,7 @@ class StopHookForMultipleThreadsTestCase def stop_hook_multiple_threads(self): """Test that lldb stop-hook works for multiple threads.""" + import pexpect exe = os.path.join(os.getcwd(), self.exe_name) prompt = "(lldb) " Modified: lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py (original) +++ lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, time import unittest2 import lldb -import pexpect import sys from lldbtest import * Added: lldb/trunk/test/plugins/builder_win32.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/plugins/builder_win32.py?rev=213343&view=auto ============================================================================== --- lldb/trunk/test/plugins/builder_win32.py (added) +++ lldb/trunk/test/plugins/builder_win32.py Thu Jul 17 20:02:02 2014 @@ -0,0 +1,4 @@ +from builder_base import * + +def buildDsym(sender=None, architecture=None, compiler=None, dictionary=None, clean=True): + return False Modified: lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py (original) +++ lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os import unittest2 import lldb -import pexpect from lldbtest import * class CommandInterpreterAPICase(TestBase): Modified: lldb/trunk/test/python_api/sbdata/TestSBData.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/sbdata/TestSBData.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/python_api/sbdata/TestSBData.py (original) +++ lldb/trunk/test/python_api/sbdata/TestSBData.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os import unittest2 import lldb -import pexpect from lldbtest import * from math import fabs import lldbutil Modified: lldb/trunk/test/settings/TestSettings.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/TestSettings.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/settings/TestSettings.py (original) +++ lldb/trunk/test/settings/TestSettings.py Thu Jul 17 20:02:02 2014 @@ -165,7 +165,7 @@ class SettingsCommandTestCase(TestBase): self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"), startstr = "auto-confirm (boolean) = false") - @unittest2.skipUnless(os.uname()[4] in ['amd64', 'i386', 'x86_64'], "requires x86 or x86_64") + @unittest2.skipUnless(os.name != "nt" and os.uname()[4] in ['amd64', 'i386', 'x86_64'], "requires x86 or x86_64") def test_disassembler_settings(self): """Test that user options for the disassembler take effect.""" self.buildDefault() Modified: lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py (original) +++ lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Test that 'stty -a' displays the same ou import os import unittest2 import lldb -import pexpect from lldbtest import * class CommandLineCompletionTestCase(TestBase): @@ -22,7 +21,7 @@ class CommandLineCompletionTestCase(Test def test_stty_dash_a_before_and_afetr_invoking_lldb_command(self): """Test that 'stty -a' displays the same output before and after running the lldb command.""" - + import pexpect if not which('expect'): self.skipTest("The 'expect' program cannot be located, skip the test") Modified: lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py (original) +++ lldb/trunk/test/tools/lldb-gdbserver/gdbremote_testcase.py Thu Jul 17 20:02:02 2014 @@ -5,7 +5,6 @@ Base class for gdb-remote test cases. import errno import os import os.path -import pexpect import platform import random import re @@ -180,6 +179,7 @@ class GdbRemoteTestCaseBase(TestBase): def launch_debug_monitor(self, attach_pid=None): # Create the command line. + import pexpect commandline = "{}{} localhost:{}".format(self.debug_monitor_exe, self.debug_monitor_extra_args, self.port) if attach_pid: commandline += " --attach=%d" % attach_pid Modified: lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py?rev=213343&r1=213342&r2=213343&view=diff ============================================================================== --- lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py (original) +++ lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py Thu Jul 17 20:02:02 2014 @@ -3,7 +3,6 @@ import os, time import unittest2 import lldb -import pexpect from lldbtest import * @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
