diff --git a/debug/org.eclipse.cdt.debug.application.tests/src/org/eclipse/cdt/debug/application/tests/StandaloneTest.java b/debug/org.eclipse.cdt.debug.application.tests/src/org/eclipse/cdt/debug/application/tests/StandaloneTest.java index 989efd27b96..cdd51e7b456 100644 --- a/debug/org.eclipse.cdt.debug.application.tests/src/org/eclipse/cdt/debug/application/tests/StandaloneTest.java +++ b/debug/org.eclipse.cdt.debug.application.tests/src/org/eclipse/cdt/debug/application/tests/StandaloneTest.java @@ -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;