mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Add logging to Stand-alone debugger test
This will help give a clue where is hangs when running on Hudson Change-Id: If72db5e9d4ac387328074071ab3eacf33d81ca9c Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
parent
941c435544
commit
50ce6beede
1 changed files with 16 additions and 0 deletions
|
@ -10,6 +10,9 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.debug.application.tests;
|
||||
|
||||
import org.apache.log4j.ConsoleAppender;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.SimpleLayout;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
|
||||
import org.eclipse.swtbot.swt.finder.SWTBot;
|
||||
|
@ -18,6 +21,7 @@ import org.eclipse.swtbot.swt.finder.waits.Conditions;
|
|||
import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
|
||||
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
|
||||
public abstract class StandaloneTest {
|
||||
|
||||
|
@ -27,11 +31,15 @@ public abstract class StandaloneTest {
|
|||
protected static String projectName;
|
||||
protected static SWTBotShell mainShell;
|
||||
protected static SWTBotView projectExplorer;
|
||||
private static final Logger fLogger = Logger.getRootLogger();
|
||||
|
||||
public static void init(String projectName) throws Exception {
|
||||
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
|
||||
SWTBotPreferences.TIMEOUT = 20000;
|
||||
|
||||
fLogger.removeAllAppenders();
|
||||
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
|
||||
|
||||
bot = new SWTBot();
|
||||
Utilities.getDefault().buildProject(projectName);
|
||||
final IPath executablePath = Utilities.getDefault().getProjectPath(projectName).append("a.out"); //$NON-NLS-1$
|
||||
|
@ -71,6 +79,14 @@ public abstract class StandaloneTest {
|
|||
// mainShell.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test class tear down method.
|
||||
*/
|
||||
@AfterClass
|
||||
public static void tearDown() {
|
||||
fLogger.removeAllAppenders();
|
||||
}
|
||||
|
||||
private static final class WaitForFileCondition extends DefaultCondition {
|
||||
private final IPath executablePath;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue