Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-02-02 07:08:21 +0000
committerUwe Stieber2015-02-02 07:08:21 +0000
commitab7610ae79fd41691b7d69ff7abbac4adc72f99b (patch)
tree353a7e85a0cbeac45506e70445d73870fbf28baf /target_explorer
parent89854750d8415b740e9fb9bfc4276c0638ec98cf (diff)
downloadorg.eclipse.tcf-ab7610ae79fd41691b7d69ff7abbac4adc72f99b.tar.gz
org.eclipse.tcf-ab7610ae79fd41691b7d69ff7abbac4adc72f99b.tar.xz
org.eclipse.tcf-ab7610ae79fd41691b7d69ff7abbac4adc72f99b.zip
Target Explorer: Attempt to use agent from tcf-agent-x86Linux-master build job
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/linux/x86_64/agentbin1849754 -> 0 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/win32/x86_64/agent.exebin1687040 -> 0 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/helloWorld.exebin8192 -> 0 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/TcfTestCase.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/utils/UtilityTestCase.java9
6 files changed, 21 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/linux/x86_64/agent b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/linux/x86_64/agent
deleted file mode 100644
index 580ab90cd..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/linux/x86_64/agent
+++ /dev/null
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/win32/x86_64/agent.exe b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/win32/x86_64/agent.exe
deleted file mode 100644
index d7684cf4f..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/agent/win32/x86_64/agent.exe
+++ /dev/null
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/helloWorld.exe b/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/helloWorld.exe
deleted file mode 100644
index 607dba83e..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/data/helloWorld/win32/x86_64/helloWorld.exe
+++ /dev/null
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml
index 7f6a231f5..9c58b314f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml
@@ -59,6 +59,7 @@
<systemProperties>
<osgi.debug>${basedir}/tracing/.options</osgi.debug>
+ <tcf.agent.path>${basedir}/.agent/agent</tcf.agent.path>
</systemProperties>
<product>org.eclipse.platform.ide</product>
<argLine>${tycho.testArgLine} ${ui.test.vmargs}</argLine>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/TcfTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/TcfTestCase.java
index d0a394a5a..0c815e138 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/TcfTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/TcfTestCase.java
@@ -19,6 +19,7 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.tcf.core.TransientPeer;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.JSON;
@@ -48,6 +49,8 @@ public class TcfTestCase extends CoreTestCase {
protected IPeer peer;
// The peer model instance
protected IPeerNode peerNode;
+ // The test agent location
+ private IPath agentLocation;
/* (non-Javadoc)
* @see org.eclipse.tcf.te.tests.CoreTestCase#setUp()
@@ -239,7 +242,15 @@ public class TcfTestCase extends CoreTestCase {
* @return The agent location or <code>null</code> if not found.
*/
protected IPath getAgentLocation() {
- return getDataLocation("agent", true, true); //$NON-NLS-1$
+ if (agentLocation == null) {
+ String agentPath = System.getProperty("tcf.agent.path"); //$NON-NLS-1$
+ if (agentPath != null && !"".equals(agentPath.trim())) { //$NON-NLS-1$
+ agentLocation = new Path(agentPath);
+ } else {
+ agentLocation = getDataLocation("agent", true, true); //$NON-NLS-1$
+ }
+ }
+ return agentLocation;
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/utils/UtilityTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/utils/UtilityTestCase.java
index df4dd89f4..597c7731f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/utils/UtilityTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/utils/UtilityTestCase.java
@@ -17,6 +17,7 @@ import junit.framework.TestSuite;
import org.eclipse.cdt.utils.elf.Elf;
import org.eclipse.cdt.utils.elf.Elf.ELFhdr;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.tcf.te.core.cdt.elf.ElfUtils;
import org.eclipse.tcf.te.runtime.utils.Host;
@@ -52,7 +53,13 @@ public class UtilityTestCase extends CoreTestCase {
if (!Host.isLinuxHost()) return;
// Use the Linux agent to test the ELF utilities
- IPath path = getDataLocation("agent", true, true); //$NON-NLS-1$
+ IPath path = null;
+ String agentPath = System.getProperty("tcf.agent.path"); //$NON-NLS-1$
+ if (agentPath != null && !"".equals(agentPath.trim())) { //$NON-NLS-1$
+ path = new Path(agentPath);
+ } else {
+ path = getDataLocation("agent", true, true); //$NON-NLS-1$
+ }
assertNotNull("Unexpected null value from getDataLocation()", path); //$NON-NLS-1$
path = path.append("agent"); //$NON-NLS-1$
assertTrue("Test ELF file does not exist or is not readable", path.toFile().canRead()); //$NON-NLS-1$

Back to the top