Author: tfiala Date: Fri Jan 22 20:24:41 2016 New Revision: 258601 URL: http://llvm.org/viewvc/llvm-project?rev=258601&view=rev Log: fixed TestConsecutiveBreakpoints test on OS X
Also renamed directory and class name to fix typos. Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile - copied, changed from r258592, lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py - copied, changed from r258592, lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp - copied, changed from r258592, lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile?rev=258600&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile (removed) @@ -1,9 +0,0 @@ -LEVEL = ../../../make - -CXX_SOURCES := main.cpp - -ifneq (,$(findstring icc,$(CC))) - CXXFLAGS += -debug inline-debug-info -endif - -include $(LEVEL)/Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=258600&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py (removed) @@ -1,59 +0,0 @@ -""" -Test continue from a breakpoint when there is a breakpoint on the next instruction also. -""" - -from __future__ import print_function - - - -import unittest2 -import lldb -import lldbsuite.test.lldbutil as lldbutil -from lldbsuite.test.lldbtest import * - -class ConsecutiveBreakpoitsTestCase(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - @expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"])) - def test (self): - self.build () - self.consecutive_breakpoints_tests() - - def consecutive_breakpoints_tests(self): - exe = os.path.join (os.getcwd(), "a.out") - - # Create a target by the debugger. - target = self.dbg.CreateTarget(exe) - self.assertTrue(target, VALID_TARGET) - - breakpoint1 = target.BreakpointCreateBySourceRegex("Set breakpoint here", lldb.SBFileSpec("main.cpp")) - self.assertTrue(breakpoint and - breakpoint.GetNumLocations() == 1, - VALID_BREAKPOINT) - - # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, self.get_process_working_directory()) - self.assertTrue(process, PROCESS_IS_VALID) - - # We should be stopped at the first breakpoint - thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, breakpoint1) - self.assertIsNotNone(thread, "Expected one thread to be stopped at breakpoint 1") - - # Set breakpoint to the next instruction - frame = thread.GetFrameAtIndex(0) - - address = frame.GetPCAddress() - instructions = target.ReadInstructions(address, 2) - self.assertTrue(len(instructions) == 2) - address = instructions[1].GetAddress() - - breakpoint2 = target.BreakpointCreateByAddress(address.GetLoadAddress(target)) - process.Continue() - - # We should be stopped at the second breakpoint - thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, breakpoint2) - self.assertIsNotNone(thread, "Expected one thread to be stopped at breakpoint 2") - - # Run the process until termination - process.Continue() Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp?rev=258600&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp (removed) @@ -1,19 +0,0 @@ -//===-- main.cpp ------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int -main(int argc, char const *argv[]) -{ - int a = 0; - int b = 1; - a = b + 1; // Set breakpoint here - b = a + 1; - return 0; -} - Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile (from r258592, lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/Makefile&r1=258592&r2=258601&rev=258601&view=diff ============================================================================== (empty) Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py (from r258592, lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py&r1=258592&r2=258601&rev=258601&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py Fri Jan 22 20:24:41 2016 @@ -11,7 +11,7 @@ import lldb import lldbsuite.test.lldbutil as lldbutil from lldbsuite.test.lldbtest import * -class ConsecutiveBreakpoitsTestCase(TestBase): +class ConsecutiveBreakpointsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @@ -19,7 +19,7 @@ class ConsecutiveBreakpoitsTestCase(Test def test (self): self.build () self.consecutive_breakpoints_tests() - + def consecutive_breakpoints_tests(self): exe = os.path.join (os.getcwd(), "a.out") @@ -28,8 +28,8 @@ class ConsecutiveBreakpoitsTestCase(Test self.assertTrue(target, VALID_TARGET) breakpoint1 = target.BreakpointCreateBySourceRegex("Set breakpoint here", lldb.SBFileSpec("main.cpp")) - self.assertTrue(breakpoint and - breakpoint.GetNumLocations() == 1, + self.assertTrue(breakpoint1 and + breakpoint1.GetNumLocations() == 1, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. @@ -42,12 +42,12 @@ class ConsecutiveBreakpoitsTestCase(Test # Set breakpoint to the next instruction frame = thread.GetFrameAtIndex(0) - + address = frame.GetPCAddress() instructions = target.ReadInstructions(address, 2) self.assertTrue(len(instructions) == 2) address = instructions[1].GetAddress() - + breakpoint2 = target.BreakpointCreateByAddress(address.GetLoadAddress(target)) process.Continue() Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp (from r258592, lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/main.cpp&r1=258592&r2=258601&rev=258601&view=diff ============================================================================== (empty) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits