1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-08 09:35:23 +02:00

Bug 378834 - Improved tests printouts for Hudson build.

Change-Id: I027c6615e4974f8bf076955c0e7c02fc33381df1
This commit is contained in:
Marc Khouzam 2013-01-13 21:40:48 -05:00
parent b8dabf1190
commit b7277f86f0
3 changed files with 18 additions and 17 deletions

View file

@ -21,6 +21,7 @@ import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
import org.eclipse.cdt.dsf.mi.service.command.events.IMIDMEvent;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
@ -218,10 +219,10 @@ public class BaseTestCase {
protected void doLaunch() throws Exception {
boolean remote = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE).equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
System.out.println("====================================================================================================");
System.out.println(String.format("Running test: %s using GDB: %s remote %s",
testName.getMethodName(), launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME), remote ? "on" : "off"));
System.out.println("====================================================================================================");
GdbPlugin.debug("===============================================================================================\n");
System.out.println(String.format("%s \"%s\" launching %s %s",
GdbPlugin.getDebugTime(), testName.getMethodName(), launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME), remote ? "with gdbserver" : ""));
GdbPlugin.debug("===============================================================================================\n");
boolean postMortemLaunch = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE)
.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE);
@ -320,7 +321,7 @@ public class BaseTestCase {
BufferedReader reader = new BufferedReader(r);
String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
GdbPlugin.debug(line + "\n");
line = line.trim();
if (line.startsWith("Listening on port")) {
break;

View file

@ -37,7 +37,7 @@ import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMContex
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMData;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
import org.eclipse.cdt.dsf.internal.DsfPlugin;
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData;
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.MIBreakpointDMContext;
@ -240,7 +240,7 @@ public class MIBreakpointsTest extends BaseTestCase {
@DsfServiceEventHandler
public void eventDispatched(IBreakpointsAddedEvent e) {
synchronized (lock) {
System.out.println(DsfPlugin.getDebugTime() + " Got bp added event");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp added event\n");
fBreakpointEvents[BP_ADDED]++;
fBreakpointEventCount++;
fBreakpointRef = ((MIBreakpointDMContext) e.getBreakpoints()[0]).getReference();
@ -251,7 +251,7 @@ public class MIBreakpointsTest extends BaseTestCase {
@DsfServiceEventHandler
public void eventDispatched(IBreakpointsUpdatedEvent e) {
synchronized (lock) {
System.out.println(DsfPlugin.getDebugTime() + " Got bp updated event");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp updated event\n");
fBreakpointEvents[BP_UPDATED]++;
fBreakpointEventCount++;
fBreakpointRef = ((MIBreakpointDMContext) e.getBreakpoints()[0]).getReference();
@ -262,7 +262,7 @@ public class MIBreakpointsTest extends BaseTestCase {
@DsfServiceEventHandler
public void eventDispatched(IBreakpointsRemovedEvent e) {
synchronized (lock) {
System.out.println(DsfPlugin.getDebugTime() + " Got bp removed event");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp removed event\n");
fBreakpointEvents[BP_REMOVED]++;
fBreakpointEventCount++;
fBreakpointRef = ((MIBreakpointDMContext) e.getBreakpoints()[0]).getReference();
@ -273,7 +273,7 @@ public class MIBreakpointsTest extends BaseTestCase {
@DsfServiceEventHandler
public void eventDispatched(MIBreakpointHitEvent e) {
synchronized (lock) {
System.out.println(DsfPlugin.getDebugTime() + " Got bp hit event");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp hit event\n");
fBreakpointEvents[BP_HIT]++;
fBreakpointEventCount++;
fBreakpointRef = e.getNumber();
@ -284,7 +284,7 @@ public class MIBreakpointsTest extends BaseTestCase {
@DsfServiceEventHandler
public void eventDispatched(MIWatchpointTriggerEvent e) {
synchronized (lock) {
System.out.println(DsfPlugin.getDebugTime() + " Got wp hit event");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got wp hit event\n");
fBreakpointEvents[WP_HIT]++;
fBreakpointEventCount++;
fBreakpointRef = e.getNumber();
@ -295,7 +295,7 @@ public class MIBreakpointsTest extends BaseTestCase {
@DsfServiceEventHandler
public void eventDispatched(MIWatchpointScopeEvent e) {
synchronized (lock) {
System.out.println(DsfPlugin.getDebugTime() + " Got wp scope event");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got wp scope event\n");
fBreakpointEvents[WP_OOS]++;
fBreakpointEventCount++;
fBreakpointRef = e.getNumber();

View file

@ -43,7 +43,7 @@ import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMContex
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMData;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
import org.eclipse.cdt.dsf.internal.DsfPlugin;
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData;
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.MIBreakpointDMContext;
@ -225,7 +225,7 @@ public class MICatchpointsTest extends BaseTestCase {
synchronized (fEventHandlerLock) {
fBreakpointEvents[BP_ADDED]++;
fBreakpointRef = ((MIBreakpointDMContext) e.getBreakpoints()[0]).getReference();
System.out.println(DsfPlugin.getDebugTime() + " Got bp added event (#" + fBreakpointRef + ")");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp added event (#" + fBreakpointRef + ")\n");
fEventHandlerLock.notifyAll();
}
}
@ -235,7 +235,7 @@ public class MICatchpointsTest extends BaseTestCase {
synchronized (fEventHandlerLock) {
fBreakpointEvents[BP_UPDATED]++;
fBreakpointRef = ((MIBreakpointDMContext) e.getBreakpoints()[0]).getReference();
System.out.println(DsfPlugin.getDebugTime() + " Got bp updated event (#" + fBreakpointRef + ")");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp updated event (#" + fBreakpointRef + ")\n");
fEventHandlerLock.notifyAll();
}
}
@ -245,7 +245,7 @@ public class MICatchpointsTest extends BaseTestCase {
synchronized (fEventHandlerLock) {
fBreakpointEvents[BP_REMOVED]++;
fBreakpointRef = ((MIBreakpointDMContext) e.getBreakpoints()[0]).getReference();
System.out.println(DsfPlugin.getDebugTime() + " Got bp removed event (#" + fBreakpointRef + ")");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp removed event (#" + fBreakpointRef + ")\n");
fEventHandlerLock.notifyAll();
}
}
@ -255,7 +255,7 @@ public class MICatchpointsTest extends BaseTestCase {
synchronized (fEventHandlerLock) {
fBreakpointEvents[BP_HIT]++;
fBreakpointRef = e.getNumber();
System.out.println(DsfPlugin.getDebugTime() + " Got bp hit event (#" + fBreakpointRef + ")");
GdbPlugin.debug(GdbPlugin.getDebugTime() + " Got bp hit event (#" + fBreakpointRef + ")\n");
fEventHandlerLock.notifyAll();
}
}