Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Wagiaalla2013-06-10 20:43:49 +0000
committerCamilo Bernal2013-06-10 21:05:38 +0000
commit4e5eee93f75d54385ccf8a44665810f2ae3bde4b (patch)
tree4b8423b4d8e12d99b53e7eac41baabdc0a0d8d18
parent8568e4dcfef1df93d234da7c735e2427858365a6 (diff)
downloadorg.eclipse.linuxtools-4e5eee93f75d54385ccf8a44665810f2ae3bde4b.tar.gz
org.eclipse.linuxtools-4e5eee93f75d54385ccf8a44665810f2ae3bde4b.tar.xz
org.eclipse.linuxtools-4e5eee93f75d54385ccf8a44665810f2ae3bde4b.zip
callgraph: fix failing tests
Change-Id: Ibdf3b5c5c51700a37e47f18cc46f4056ef520730 Reviewed-on: https://git.eclipse.org/r/13711 Tested-by: Hudson CI Reviewed-by: Camilo Bernal <cabernal@redhat.com> IP-Clean: Camilo Bernal <cabernal@redhat.com> Tested-by: Camilo Bernal <cabernal@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java10
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java14
2 files changed, 12 insertions, 12 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java
index a72b6ab9a2..64edeac1bf 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java
@@ -33,9 +33,9 @@ public class ConfigurationTest extends AbstractStapTest{
String testCDirectives = "-DRandomjunk -DMoreJunk";
String testOutputPath = "/tmp/ThisFileDoesNothingDeleteIt";
- String testBinaryPath = "More random junk";
+ String testBinaryPath = "/path/to/binary";
String testScriptPath = "/tmp/NotAScriptFile.stp";
- String testArguments = "Nonexistent Arguments";
+ String testArguments = "/path/to/binary";
int testPid = 413;
int testBuffer = 100;
int testPass = 10;
@@ -86,9 +86,9 @@ public class ConfigurationTest extends AbstractStapTest{
assertEquals("stap -v -p" + testPass + " -k -g -P -u -w -b -t -s"
+ testBuffer + " -x" + testPid + " " + testCDirectives
- + " -F --skip-badvars --ignore-dwarf -q " + "-o "
- + testOutputPath + " -c '" + testBinaryPath + "' "
- + testScriptPath + " " + testArguments,
+ + " -F --skip-badvars --ignore-dwarf -q " + " -c '" + testBinaryPath
+ + "' " + testScriptPath + " --runtime=dyninst " + testArguments + " >& "
+ + testOutputPath,
del.generateCommand(config));
killStap();
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java
index f2113afdd3..e9c671a3f6 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Red Hat - initial API and implementation
*******************************************************************************/
@@ -15,13 +15,13 @@ import java.io.File;
import org.eclipse.linuxtools.internal.callgraph.core.PluginConstants;
import org.eclipse.linuxtools.internal.callgraph.core.SystemTapCommandGenerator;
-public class SystemTapCommandGeneratorTest extends AbstractStapTest{
-
+public class SystemTapCommandGeneratorTest extends AbstractStapTest{
+
//HACK TO GET THE PATH TO THE TESTING PROJECT
File file = new File("");
private String location = file.getAbsolutePath() + "/";
SystemTapCommandGenerator stapgen = new SystemTapCommandGenerator();
-
+
public void testExecutionWithScriptAndBinaryAndArgument(){
String binaryFilePath = location + "factorial";
@@ -32,12 +32,12 @@ public class SystemTapCommandGeneratorTest extends AbstractStapTest{
binaryFilePath, "", true, true, binaryFilePath, "",
PluginConstants.STAP_PATH);
- assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath + " "
+ assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath + " --runtime=dyninst "
+ binaryFilePath, cmd);
killStap();
// END
}
-
+
public void testScriptExecution(){
String scriptPath = location + "simple.stp";
@@ -61,7 +61,7 @@ public class SystemTapCommandGeneratorTest extends AbstractStapTest{
assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath, cmd);
// END
-
+
killStap();
}

Back to the top