mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 09:55:29 +02:00
Bug 532592: [tests] cleanup use of DEBUGGER_MODE_REMOTE in tests
Be consistent in using DEBUGGER_MODE_REMOTE to set remote session in parameterized tests. Change-Id: Ie8db7df02ec575f3e89d22e00b06e4e197833a37
This commit is contained in:
parent
60affd8b9f
commit
6a0de9f520
6 changed files with 8 additions and 44 deletions
|
@ -195,9 +195,10 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
|
|||
assumeGdbVersionAtLeast(gdbVersionPostfix);
|
||||
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, gdbPath);
|
||||
setLaunchAttribute(ATTR_DEBUG_SERVER_NAME, gdbServerPath);
|
||||
if (remote)
|
||||
if (remote) {
|
||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2012 Ericsson and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Ericsson - Initial Implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.tests.dsf.gdb.framework;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
||||
/**
|
||||
* This base class sets the attributes necessary to do a
|
||||
* remote debugging session.
|
||||
*/
|
||||
public class BaseRemoteSuite {
|
||||
@BeforeClass
|
||||
public static void baseRemoteSuiteBeforeClassMethod() {
|
||||
BaseTestCase.setGlobalLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
||||
}
|
||||
@AfterClass
|
||||
public static void baseRemoteSuiteAfterClassMethod() {
|
||||
BaseTestCase.removeGlobalLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE);
|
||||
}
|
||||
}
|
|
@ -149,10 +149,10 @@ public class CommandTimeoutTest extends BaseParametrizedTestCase {
|
|||
node.putInt( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT_VALUE, 1000 );
|
||||
|
||||
// Setup a remote launch so that it sends a "-target-remote" as part of the
|
||||
// launch steps.
|
||||
// launch steps...
|
||||
setLaunchAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE );
|
||||
// We won't start gdbserver, so the command will timeout
|
||||
// ... but we won't start gdbserver, so the command will timeout
|
||||
setLaunchAttribute( ITestConstants.LAUNCH_GDB_SERVER, false);
|
||||
|
||||
try {
|
||||
|
|
|
@ -110,8 +110,6 @@ public class GDBProcessesTest extends BaseParametrizedTestCase {
|
|||
|
||||
/*
|
||||
* Return whether thread names are reported by the debugger.
|
||||
*
|
||||
* This defaults to false, and is overridden for specific versions of gdb.
|
||||
*/
|
||||
protected boolean threadNamesSupported() {
|
||||
return !runningOnWindows() && !isRemoteSession();
|
||||
|
|
|
@ -164,6 +164,8 @@ public class GDBRemoteTracepointsTest extends BaseParametrizedTestCase {
|
|||
|
||||
@Override
|
||||
public void doBeforeTest() throws Exception {
|
||||
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
||||
assumeRemoteSession();
|
||||
super.doBeforeTest();
|
||||
resolveLineTagLocations(SOURCE_NAME, LINE_TAGS);
|
||||
|
||||
|
@ -203,10 +205,6 @@ public class GDBRemoteTracepointsTest extends BaseParametrizedTestCase {
|
|||
|
||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||
|
||||
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
||||
|
||||
// To test both fast and normal tracepoints, we use the FAST_THEN_NORMAL setting
|
||||
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_TRACEPOINT_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_TRACEPOINT_FAST_THEN_NORMAL);
|
||||
|
|
|
@ -90,6 +90,8 @@ public class TraceFileTest extends BaseParametrizedTestCase {
|
|||
|
||||
@Override
|
||||
public void doBeforeTest() throws Exception {
|
||||
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
||||
assumeRemoteSession();
|
||||
resolveLineTagLocations(SOURCE_NAME, LINE_TAGS);
|
||||
assumeGdbVersionAtLeast(ITestConstants.SUFFIX_GDB_7_4);
|
||||
removeTeminatedLaunchesBeforeTest();
|
||||
|
@ -341,9 +343,6 @@ public class TraceFileTest extends BaseParametrizedTestCase {
|
|||
// Set launch attributes
|
||||
super.setLaunchAttributes();
|
||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
||||
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_TRACEPOINT_MODE,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_TRACEPOINT_MODE_DEFAULT);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue