aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Henrique Barboza2011-08-03 13:31:17 (EDT)
committerAndrew Overholt2011-08-03 16:55:09 (EDT)
commitc03a563c4b1042774c28d1a8cf910329d4309a7d (patch)
tree9dcdafa958b4a18e3d7a81911518846fcda99ef5
parentcbdec1fdd1765f9bf281d1fe85993aef94330364 (diff)
downloadorg.eclipse.linuxtools-c03a563c4b1042774c28d1a8cf910329d4309a7d.zip
org.eclipse.linuxtools-c03a563c4b1042774c28d1a8cf910329d4309a7d.tar.gz
org.eclipse.linuxtools-c03a563c4b1042774c28d1a8cf910329d4309a7d.tar.bz2
Fixing Helgrind tests plugin issue with Tycho.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/META-INF/MANIFEST.MF4
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/pom.xml26
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/BasicHelgrindTest.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/DoubleClickTest.java24
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/ExpandCollapseTest.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/LaunchConfigTabTest.java10
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/valgrindFiles/testHelgrindGeneric/template_valgrind_1770.txt16
7 files changed, 54 insertions, 30 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/META-INF/MANIFEST.MF b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/META-INF/MANIFEST.MF
index 46ddd02..bc795fb 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/META-INF/MANIFEST.MF
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,9 @@ Bundle-Activator: org.eclipse.linuxtools.internal.valgrind.helgrind.tests.Helgri
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.junit;bundle-version="4.7.0"
+ org.junit;bundle-version="4.7.0",
+ org.eclipse.ui.ide.application,
+ org.eclipse.cdt.managedbuilder.gnu.ui
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/pom.xml b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/pom.xml
index c8d42f5..c1fd21f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/pom.xml
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/pom.xml
@@ -23,4 +23,30 @@
<name>Linux Tools Helgrind Tests Plug-in</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <product>org.eclipse.sdk.ide</product>
+ <argLine>-Declipse.valgrind.tests.runValgrind=no</argLine>
+ <testSuite>org.eclipse.linuxtools.valgrind.helgrind.tests</testSuite>
+ <testClass>org.eclipse.linuxtools.internal.valgrind.helgrind.tests.AllTests</testClass>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/BasicHelgrindTest.java b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/BasicHelgrindTest.java
index 3686679..49eb16f 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/BasicHelgrindTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/BasicHelgrindTest.java
@@ -28,7 +28,7 @@ public class BasicHelgrindTest extends AbstractHelgrindTest {
public void testNumErrors() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
- doLaunch(config, "testNumErrors"); //$NON-NLS-1$
+ doLaunch(config, "testHelgrindGeneric"); //$NON-NLS-1$
ValgrindViewPart view = ValgrindUIPlugin.getDefault().getView();
assertEquals(3, view.getMessages().length);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/DoubleClickTest.java b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/DoubleClickTest.java
index 650cba1..f65c7dc 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/DoubleClickTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/DoubleClickTest.java
@@ -73,30 +73,10 @@ public class DoubleClickTest extends AbstractHelgrindTest {
deleteProject(proj);
super.tearDown();
}
-
- public void testDoubleClickFile() throws Exception {
- ILaunchConfiguration config = createConfiguration(proj.getProject());
- doLaunch(config, "testDoubleClickFile"); //$NON-NLS-1$
-
- doDoubleClick();
-
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- IEditorInput input = editor.getEditorInput();
- if (input instanceof IFileEditorInput) {
- IFileEditorInput fileInput = (IFileEditorInput) input;
- File expectedFile = new File(proj.getProject().getLocation().toOSString(), frame.getFile());
- File actualFile = fileInput.getFile().getLocation().toFile();
-
- assertEquals(expectedFile.getCanonicalPath(), actualFile.getCanonicalPath());
- }
- else {
- fail();
- }
- }
public void testDoubleClickLine() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
- doLaunch(config, "testDoubleClickLine"); //$NON-NLS-1$
+ doLaunch(config, "testHelgrindGeneric"); //$NON-NLS-1$
doDoubleClick();
@@ -122,7 +102,7 @@ public class DoubleClickTest extends AbstractHelgrindTest {
public void testDoubleClickLaunchRemoved() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
- ILaunch launch = doLaunch(config, "testDoubleClickLine"); //$NON-NLS-1$
+ ILaunch launch = doLaunch(config, "testHelgrindGeneric"); //$NON-NLS-1$
// Remove launch - tests #284919
DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/ExpandCollapseTest.java b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/ExpandCollapseTest.java
index e2f3640..9042cb7 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/ExpandCollapseTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/ExpandCollapseTest.java
@@ -40,7 +40,7 @@ public class ExpandCollapseTest extends AbstractHelgrindTest {
public void testExpand() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
- doLaunch(config, "testDefaults"); //$NON-NLS-1$
+ doLaunch(config, "testHelgrindGeneric"); //$NON-NLS-1$
ValgrindViewPart view = ValgrindUIPlugin.getDefault().getView();
viewer = view.getMessagesViewer();
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/LaunchConfigTabTest.java b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/LaunchConfigTabTest.java
index 173d168..91c690d 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/LaunchConfigTabTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/src/org/eclipse/linuxtools/internal/valgrind/helgrind/tests/LaunchConfigTabTest.java
@@ -73,7 +73,7 @@ public class LaunchConfigTabTest extends AbstractHelgrindTest {
public void testDefaults() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
- ILaunch launch = saveAndLaunch(wc, "testDefaults"); //$NON-NLS-1$
+ ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric"); //$NON-NLS-1$
IProcess[] p = launch.getProcesses();
if (p.length > 0) {
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
@@ -96,7 +96,7 @@ public class LaunchConfigTabTest extends AbstractHelgrindTest {
tab.performApply(wc);
wc.doSave();
- ILaunch launch = saveAndLaunch(wc, "testTrackLockorders"); //$NON-NLS-1$
+ ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric"); //$NON-NLS-1$
IProcess[] p = launch.getProcesses();
if (p.length > 0) {
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
@@ -114,7 +114,7 @@ public class LaunchConfigTabTest extends AbstractHelgrindTest {
tab.performApply(wc);
wc.doSave();
- ILaunch launch = saveAndLaunch(wc, "testHistoryNone"); //$NON-NLS-1$
+ ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric"); //$NON-NLS-1$
IProcess[] p = launch.getProcesses();
if (p.length > 0) {
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
@@ -132,7 +132,7 @@ public class LaunchConfigTabTest extends AbstractHelgrindTest {
tab.performApply(wc);
wc.doSave();
- ILaunch launch = saveAndLaunch(wc, "testHistoryApprox"); //$NON-NLS-1$
+ ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric"); //$NON-NLS-1$
IProcess[] p = launch.getProcesses();
if (p.length > 0) {
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
@@ -151,7 +151,7 @@ public class LaunchConfigTabTest extends AbstractHelgrindTest {
tab.performApply(wc);
wc.doSave();
- ILaunch launch = saveAndLaunch(wc, "testConflictCacheSize"); //$NON-NLS-1$
+ ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric"); //$NON-NLS-1$
IProcess[] p = launch.getProcesses();
if (p.length > 0) {
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/valgrindFiles/testHelgrindGeneric/template_valgrind_1770.txt b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/valgrindFiles/testHelgrindGeneric/template_valgrind_1770.txt
new file mode 100644
index 0000000..dcb7b26
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.helgrind.tests/valgrindFiles/testHelgrindGeneric/template_valgrind_1770.txt
@@ -0,0 +1,16 @@
+==1770== Invalid read of size 1
+==1770== at 0x4004E2: main (test.c:16)
+==1770== Address 0x4c2104a is 0 bytes after a block of size 10 alloc'd
+==1770== at 0x4A05E5D: malloc (vg_replace_malloc.c:195)
+==1770== by 0x4004D5: main (test.c:15)
+==1770==
+==1770== Invalid write of size 1
+==1770== at 0x4004F3: main (test.c:17)
+==1770== Address 0x4c2104a is 0 bytes after a block of size 10 alloc'd
+==1770== at 0x4A05E5D: malloc (vg_replace_malloc.c:195)
+==1770== by 0x4004D5: main (test.c:15)
+==1770==
+==1770== 10 bytes in 1 blocks are definitely lost in loss record 1 of 1
+==1770== at 0x4A05E5D: malloc (vg_replace_malloc.c:195)
+==1770== by 0x4004D5: main (test.c:15)
+==1770==