mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 438934 - Make GDBConsoleBreakpointsTest provide more information
upon failure. Change-Id: Ia3cfe4fb455f4ca5048e629c623bba6331264b09 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/30096 Tested-by: Hudson CI
This commit is contained in:
parent
935e88036d
commit
0cdedcb9e9
1 changed files with 24 additions and 3 deletions
|
@ -320,10 +320,31 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase {
|
|||
// Remove the platform breakpoint and verify that
|
||||
// the target breakpoint is deleted.
|
||||
deletePlatformBreakpoint(plBpt);
|
||||
waitForBreakpointEvent(IBreakpointsRemovedEvent.class);
|
||||
Assert.assertTrue(getPlatformBreakpointCount() == 0);
|
||||
|
||||
// Don't fail right away if we don't get the breakpoint event
|
||||
// as we can't tell the true cause.
|
||||
// Let further checks happen to help figure things out.
|
||||
|
||||
String failure = "";
|
||||
try {
|
||||
waitForBreakpointEvent(IBreakpointsRemovedEvent.class);
|
||||
} catch (Exception e) {
|
||||
failure += e.getMessage();
|
||||
}
|
||||
|
||||
int platformBp = getPlatformBreakpointCount();
|
||||
if (platformBp != 0) {
|
||||
if (!failure.isEmpty()) failure += ", ";
|
||||
failure += "Platform breakpoints remaining: " + platformBp;
|
||||
}
|
||||
|
||||
miBpts = getTargetBreakpoints();
|
||||
Assert.assertTrue(miBpts.length == 0);
|
||||
if (miBpts.length != 0) {
|
||||
if (!failure.isEmpty()) failure += ", ";
|
||||
failure += "Target breakpoints remaining: " + miBpts.length;
|
||||
}
|
||||
|
||||
Assert.assertTrue(failure, failure.isEmpty());
|
||||
}
|
||||
|
||||
private void setConsoleLineBreakpoint(String fileName, int lineNumber) throws Throwable {
|
||||
|
|
Loading…
Add table
Reference in a new issue