aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Pontes2011-10-05 13:37:07 (EDT)
committerOtavio Pontes2011-11-09 13:59:04 (EST)
commit2ce832d53f111a53fc2b23d903c4b700c684fd9c (patch)
treefa0add1f8b91510c9508e614515aeddc90696f1a
parentdd38d8163d294834c08fd6630c1e67dedd28ff90 (diff)
downloadorg.eclipse.linuxtools-2ce832d53f111a53fc2b23d903c4b700c684fd9c.zip
org.eclipse.linuxtools-2ce832d53f111a53fc2b23d903c4b700c684fd9c.tar.gz
org.eclipse.linuxtools-2ce832d53f111a53fc2b23d903c4b700c684fd9c.tar.bz2
Valgrind: Fixing Min Version Test (bug #353056)
This test was broken after the addition of the packages org.eclipse.tools.launch.core and ui ChangeLog: * src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java: Changing the visibility of getValgrindCommand from protected to public * src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java: Fixing tests broken by commit that uses tools.launch.core factories.
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog6
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java23
4 files changed, 28 insertions, 9 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
index 0c60196..e679d0a 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-05 Otavio Pontes <obusatto@br.ibm.com>
+
+ Related to bug #353056
+ * src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java:
+ Changing the visibility of getValgrindCommand from protected to public
+
2011-09-29 Otavio Pontes <obusatto@br.ibm.com>
Related to bug #353056
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java
index 5ab24c1..64d1c74 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindLaunchPlugin.java
@@ -142,7 +142,7 @@ public class ValgrindLaunchPlugin extends AbstractUIPlugin {
valgrindCommand = command;
}
- protected ValgrindCommand getValgrindCommand() {
+ public ValgrindCommand getValgrindCommand() {
if (valgrindCommand == null) {
valgrindCommand = new ValgrindCommand();
}
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
index b990dd0..e7d68be 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-05 Otavio Pontes <obusatto@br.ibm.com>
+
+ Related to bug #353056
+ * src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java:
+ Fixing tests broken by commit that uses tools.launch.core factories.
+
2011-09-29 Otavio Pontes <obusatto@br.ibm.com>
Related to bug #353056
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java
index 7d0a64d..8d2dc5c 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.memcheck.tests/src/org/eclipse/linuxtools/internal/valgrind/memcheck/tests/MinVersionTest.java
@@ -10,19 +10,28 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.valgrind.memcheck.tests;
+import java.io.IOException;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.linuxtools.internal.valgrind.core.ValgrindCommand;
import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchPlugin;
import org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab;
+import org.eclipse.linuxtools.internal.valgrind.tests.ValgrindStubCommand;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.osgi.framework.Version;
public class MinVersionTest extends AbstractMemcheckTest {
- private static final Version VER_3_2_1 = new Version(3, 2, 1);
- private Version verSave;
+ private ValgrindCommand valgrindSave;
+
+ class ValgrindIncorrectVersion extends ValgrindStubCommand {
+ @Override
+ public String whichVersion(IProject project) throws IOException {
+ return "valgrind-3.2.1"; //$NON-NLS-1$
+ }
+ }
@Override
protected void setUp() throws Exception {
@@ -33,9 +42,8 @@ public class MinVersionTest extends AbstractMemcheckTest {
}
private void saveVersion() throws CoreException {
- // verSave = ValgrindLaunchPlugin.getDefault().getValgrindVersion();
- // ValgrindLaunchPlugin.getDefault().setValgrindVersion(VER_3_2_1);
- // TODO: Fix test
+ valgrindSave = ValgrindLaunchPlugin.getDefault().getValgrindCommand();
+ ValgrindLaunchPlugin.getDefault().setValgrindCommand(new ValgrindIncorrectVersion());
}
@Override
@@ -47,8 +55,7 @@ public class MinVersionTest extends AbstractMemcheckTest {
}
private void restoreVersion() {
- // ValgrindLaunchPlugin.getDefault().setValgrindVersion(verSave);
- // TODO: Fix test
+ ValgrindLaunchPlugin.getDefault().setValgrindCommand(valgrindSave);
}
public void testLaunchBadVersion() throws Exception {