Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2014-09-11 19:10:26 +0000
committerAlexander Kurtakov2014-09-16 07:22:53 +0000
commit2bc45248507aa7281e19a5177e9e0eff49ab476d (patch)
tree4390cbd773ba5cb4d6ae5e04dc39f69838e621a6 /gcov
parentfecdc7fcd72967435ffccc320229b0bdf67384a9 (diff)
downloadorg.eclipse.linuxtools-2bc45248507aa7281e19a5177e9e0eff49ab476d.tar.gz
org.eclipse.linuxtools-2bc45248507aa7281e19a5177e9e0eff49ab476d.tar.xz
org.eclipse.linuxtools-2bc45248507aa7281e19a5177e9e0eff49ab476d.zip
Enable logging of all SWTBot tests with log4J.
Add log4j logging to SWTBot tests found in test bundles that reference the log4j bundle but do not actually use it. Change-Id: I3407e7574f405c4bcf36d5452fe6178f01b159b4 Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/33279 Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
index 8652d44fa0..a66cb95818 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
@@ -14,6 +14,9 @@ import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.util.TreeSet;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.SimpleLayout;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -58,12 +61,14 @@ public abstract class GcovTest {
private static SWTBotView projectExplorer;
private static SWTBotShell mainShell;
+ private static final Logger fLogger = Logger.getRootLogger();
private static SWTWorkbenchBot bot;
private static String testProjectName;
private static String testProjectType;
public static SWTWorkbenchBot init(String projectName, String projectType)
throws Exception {
+ fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
bot = new SWTWorkbenchBot();
testProjectName = projectName;
testProjectType = projectType;

Back to the top