Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorXavier Raynaud2012-03-14 13:46:09 +0000
committerXavier Raynaud2012-03-14 13:46:09 +0000
commit91979509025c86777ddddd0f3548fd473733f237 (patch)
treee4da05f88493d185a9acf4a83077aa62a0ed092f /gcov
parent716262043ea6d26c8ad18aed0f2db791d5a1d508 (diff)
downloadorg.eclipse.linuxtools-91979509025c86777ddddd0f3548fd473733f237.tar.gz
org.eclipse.linuxtools-91979509025c86777ddddd0f3548fd473733f237.tar.xz
org.eclipse.linuxtools-91979509025c86777ddddd0f3548fd473733f237.zip
another attemps to fix gcov test in hudson
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java9
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java11
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java11
3 files changed, 28 insertions, 3 deletions
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 4d4e0dc5ff..6a97ad3f56 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
@@ -4,6 +4,7 @@ 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.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -41,9 +42,15 @@ public class GcovTestC {
}
bot.perspectiveByLabel("C/C++").activate();
+ bot.sleep(1000);
+ if (bot.getFinder().activeShell() == null) {
+ bot.shells()[0].activate();
+ bot.sleep(1000);
+ }
bot.captureScreenshot(PROJECT_NAME + ".beforeClass.2.jpg");
// Turn off automatic building by default
- bot.menu("Window").menu("Preferences").click();
+ SWTBotMenu windowsMenu = bot.menu("Window");
+ windowsMenu.menu("Preferences").click();
SWTBotShell shell = bot.shell("Preferences");
shell.activate();
bot.tree().expandNode("General").select("Workspace");
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 cd0dc42d90..bf56cbe0e4 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
@@ -4,6 +4,7 @@ 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.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -31,6 +32,7 @@ public class GcovTestCLibrary {
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
+ bot.captureScreenshot(PROJECT_NAME + ".beforeClass.1.jpg");
try {
bot.viewByTitle("Welcome").close();
// hide Subclipse Usage stats popup if present/installed
@@ -41,8 +43,15 @@ public class GcovTestCLibrary {
}
bot.perspectiveByLabel("C/C++").activate();
+ bot.sleep(1000);
+ if (bot.getFinder().activeShell() == null) {
+ bot.shells()[0].activate();
+ bot.sleep(1000);
+ }
+ bot.captureScreenshot(PROJECT_NAME + ".beforeClass.2.jpg");
// Turn off automatic building by default
- bot.menu("Window").menu("Preferences").click();
+ SWTBotMenu windowsMenu = bot.menu("Window");
+ windowsMenu.menu("Preferences").click();
SWTBotShell shell = bot.shell("Preferences");
shell.activate();
bot.tree().expandNode("General").select("Workspace");
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 b3e3f24ee7..a9b0bede83 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
@@ -4,6 +4,7 @@ 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.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -30,6 +31,7 @@ public class GcovTestCPP {
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
+ bot.captureScreenshot(PROJECT_NAME + ".beforeClass.1.jpg");
try {
bot.viewByTitle("Welcome").close();
// hide Subclipse Usage stats popup if present/installed
@@ -40,8 +42,15 @@ public class GcovTestCPP {
}
bot.perspectiveByLabel("C/C++").activate();
+ bot.sleep(1000);
+ if (bot.getFinder().activeShell() == null) {
+ bot.shells()[0].activate();
+ bot.sleep(1000);
+ }
+ bot.captureScreenshot(PROJECT_NAME + ".beforeClass.2.jpg");
// Turn off automatic building by default
- bot.menu("Window").menu("Preferences").click();
+ SWTBotMenu windowsMenu = bot.menu("Window");
+ windowsMenu.menu("Preferences").click();
SWTBotShell shell = bot.shell("Preferences");
shell.activate();
bot.tree().expandNode("General").select("Workspace");

Back to the top