diff options
author | Daniel Henrique Barboza | 2011-08-03 17:31:17 +0000 |
---|---|---|
committer | Andrew Overholt | 2011-08-15 19:28:13 +0000 |
commit | dba823b0d24f9cff97acfd67bc2439821a73d829 (patch) | |
tree | 3543c1f487844ea80fb1431d798214591e9b123f | |
parent | e037e0260f244305c93f2384a47e20238f8133b4 (diff) | |
download | org.eclipse.linuxtools-dba823b0d24f9cff97acfd67bc2439821a73d829.tar.gz org.eclipse.linuxtools-dba823b0d24f9cff97acfd67bc2439821a73d829.tar.xz org.eclipse.linuxtools-dba823b0d24f9cff97acfd67bc2439821a73d829.zip |
Fixing Helgrind tests plugin issue with Tycho.
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 cea909ee02..edc439e99f 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 0f5904cb6b..566834fe76 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 3686679b09..49eb16fa3b 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 650cba15c3..f65c7dc3fb 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 e2f36400fb..9042cb7073 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 173d168898..91c690da76 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 0000000000..dcb7b267c5 --- /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== |