Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorXavier Raynaud2012-03-07 09:29:10 +0000
committerXavier Raynaud2012-03-07 09:30:25 +0000
commitb16f703167787774e6b344200b93ed92d81f2486 (patch)
treead5672bbe2155662f62d80f68cd8a967f7e8495b /gcov
parent1215066622d829c513c9c91c35f1f02a7da7703a (diff)
downloadorg.eclipse.linuxtools-b16f703167787774e6b344200b93ed92d81f2486.tar.gz
org.eclipse.linuxtools-b16f703167787774e6b344200b93ed92d81f2486.tar.xz
org.eclipse.linuxtools-b16f703167787774e6b344200b93ed92d81f2486.zip
Trying to fix gcov test errors
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.core/plugin.xml77
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java27
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java27
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java27
4 files changed, 108 insertions, 50 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/plugin.xml b/gcov/org.eclipse.linuxtools.gcov.core/plugin.xml
index 1fac0ec963..0e3e6340bb 100644
--- a/gcov/org.eclipse.linuxtools.gcov.core/plugin.xml
+++ b/gcov/org.eclipse.linuxtools.gcov.core/plugin.xml
@@ -1,38 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.ui.views">
- <category
- id="org.eclipse.linuxtools.gcov"
- name="%gcovCategory">
- </category>
- <view
- allowMultiple="true"
- category="org.eclipse.linuxtools.gcov"
- class="org.eclipse.linuxtools.internal.gcov.view.CovView"
- icon="icons/toggle.gif"
- id="org.eclipse.linuxtools.gcov.view"
- name="%gcov"
- restorable="false">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.linuxtools.internal.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor"
- icon="icons/src_file_obj.gif"
- id="org.eclipse.linuxtools.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor"
- name="Source Not Found">
- </editor>
- <editor
- extensions="gcda, gcno"
- icon="icons/toggle.gif"
- id="org.eclipse.linuxtools.gcov.editor"
- launcher="org.eclipse.linuxtools.internal.gcov.action.OpenGCAction"
- name="%gcovEditor">
- </editor>
- </extension>
-
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ id="org.eclipse.linuxtools.gcov"
+ name="%gcovCategory">
+ </category>
+ <view
+ allowMultiple="true"
+ category="org.eclipse.linuxtools.gcov"
+ class="org.eclipse.linuxtools.internal.gcov.view.CovView"
+ icon="icons/toggle.gif"
+ id="org.eclipse.linuxtools.gcov.view"
+ name="%gcov"
+ restorable="false">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.linuxtools.internal.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor"
+ icon="icons/src_file_obj.gif"
+ id="org.eclipse.linuxtools.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor"
+ name="Source Not Found">
+ </editor>
+ <editor
+ default="true"
+ extensions="gcda, gcno"
+ icon="icons/toggle.gif"
+ id="org.eclipse.linuxtools.gcov.editor"
+ launcher="org.eclipse.linuxtools.internal.gcov.action.OpenGCAction"
+ name="%gcovEditor">
+ </editor>
+ </extension>
+
+
+</plugin>
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java
index 3042f7dc00..586b4561f5 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java
@@ -1,8 +1,10 @@
package org.eclipse.linuxtools.internal.gcov.test;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,10 +30,27 @@ public class GcovTestC {
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
+ try {
+ bot.viewByTitle("Welcome").close();
+ // hide Subclipse Usage stats popup if present/installed
+ bot.shell("Subclipse Usage").activate();
+ bot.button("Cancel").click();
+ } catch (WidgetNotFoundException e) {
+ // ignore
+ }
+
bot.perspectiveByLabel("C/C++").activate();
- //bot.shells()[0].activate();
- SWTBotMenu menu = bot.menu("Build Automatically");
- menu.click();
+ // Turn off automatic building by default
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.sleep(1000);
+ bot.button("Apply").click();
+ bot.button("OK").click();
}
@RunWith(SWTBotJunit4ClassRunner.class)
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java
index db41c15c25..cd0dc42d90 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java
@@ -1,8 +1,10 @@
package org.eclipse.linuxtools.internal.gcov.test;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -29,10 +31,27 @@ public class GcovTestCLibrary {
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
+ try {
+ bot.viewByTitle("Welcome").close();
+ // hide Subclipse Usage stats popup if present/installed
+ bot.shell("Subclipse Usage").activate();
+ bot.button("Cancel").click();
+ } catch (WidgetNotFoundException e) {
+ // ignore
+ }
+
bot.perspectiveByLabel("C/C++").activate();
- //bot.shells()[0].activate();
- SWTBotMenu menu = bot.menu("Build Automatically");
- menu.click();
+ // Turn off automatic building by default
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.sleep(1000);
+ bot.button("Apply").click();
+ bot.button("OK").click();
}
@RunWith(SWTBotJunit4ClassRunner.class)
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java
index 7d6d1dd60f..b3e3f24ee7 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java
@@ -1,8 +1,10 @@
package org.eclipse.linuxtools.internal.gcov.test;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,10 +30,27 @@ public class GcovTestCPP {
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
+ try {
+ bot.viewByTitle("Welcome").close();
+ // hide Subclipse Usage stats popup if present/installed
+ bot.shell("Subclipse Usage").activate();
+ bot.button("Cancel").click();
+ } catch (WidgetNotFoundException e) {
+ // ignore
+ }
+
bot.perspectiveByLabel("C/C++").activate();
- //bot.shells()[0].activate();
- SWTBotMenu menu = bot.menu("Build Automatically");
- menu.click();
+ // Turn off automatic building by default
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.sleep(1000);
+ bot.button("Apply").click();
+ bot.button("OK").click();
}
@RunWith(SWTBotJunit4ClassRunner.class)

Back to the top