Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-06-03 00:07:33 +0000
committereutarass2011-06-03 00:07:33 +0000
commitb083234ac4a0ac26e59e36f5bf00897adb65b123 (patch)
tree8b0eab39176434c7d9f6a57efe0919d675cce303 /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug
parentc3d538c4fce547cc4fc0e6cd6bd1d846337773f5 (diff)
downloadorg.eclipse.tcf-b083234ac4a0ac26e59e36f5bf00897adb65b123.tar.gz
org.eclipse.tcf-b083234ac4a0ac26e59e36f5bf00897adb65b123.tar.xz
org.eclipse.tcf-b083234ac4a0ac26e59e36f5bf00897adb65b123.zip
TCF Tests: improved Interability Test - run random combination of any other tests.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java17
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java7
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java7
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java2
4 files changed, 21 insertions, 12 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
index edbea4d26..bdbc981f4 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
@@ -18,6 +18,7 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Random;
import org.eclipse.tm.tcf.protocol.IChannel;
import org.eclipse.tm.tcf.protocol.IPeer;
@@ -148,13 +149,21 @@ public class TCFTestSuite {
pending_tests.add(new Runnable() {
public void run() {
listener.progress("Running Interability Test...", ++count_done, count_total);
+ Random rnd = new Random();
for (int i = 0; i < channels.length; i++) {
ITCFTest test = null;
- switch (i % 4) {
+ switch (rnd.nextInt(11)) {
case 0: test = new TestEcho(TCFTestSuite.this, channels[i]); break;
- case 1: test = new TestAttachTerminate(TCFTestSuite.this, channels[i]); break;
- case 2: test = new TestRCBP1(TCFTestSuite.this, channels[i], i, path_map, mem_map); break;
- case 3: test = new TestFileSystem(TCFTestSuite.this, channels[i], i); break;
+ case 1: test = new TestEchoERR(TCFTestSuite.this, channels[i]); break;
+ case 2: test = new TestEchoFP(TCFTestSuite.this, channels[i]); break;
+ case 3: test = new TestAttachTerminate(TCFTestSuite.this, channels[i]); break;
+ case 4: test = new TestExpressions(TCFTestSuite.this, channels[i]); break;
+ case 5: test = new TestRCBP1(TCFTestSuite.this, channels[i], i, path_map, mem_map); break;
+ case 6: test = new TestFileSystem(TCFTestSuite.this, channels[i], i); break;
+ case 7: test = new TestPathMap(TCFTestSuite.this, channels[i], path_map); break;
+ case 8: test = new TestStreams(TCFTestSuite.this, channels[i]); break;
+ case 9: test = new TestSysMonitor(TCFTestSuite.this, channels[i]); break;
+ case 10: test = new TestTerminals(TCFTestSuite.this, channels[i]); break;
}
active_tests.put(test, channels[i]);
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
index a4ce7987d..c7f5b6427 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
@@ -144,13 +144,6 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
}
public void contextException(String context, String msg) {
- IRunControl.RunControlContext ctx = ctx_map.get(context);
- if (ctx == null) return;
- if (process_ids.contains(ctx.getParentID())) {
- /*
- exit(new Error("Unexpected 'contextException' event for " + context + ": " + msg));
- */
- }
}
public void contextRemoved(String[] context_ids) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
index 61afd99af..a861cb341 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
@@ -546,6 +546,13 @@ class TestExpressions implements ITCFTest,
}
public void contextException(String context, String msg) {
+ if (test_done) return;
+ IRunControl.RunControlContext ctx = ctx_map.get(context);
+ if (ctx != null) {
+ String p = ctx.getParentID();
+ String c = ctx.getCreatorID();
+ if (!test_ctx_id.equals(c) && !test_ctx_id.equals(p)) return;
+ }
exit(new Exception("Context exception: " + msg));
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
index e00fc6c72..32ef648ba 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
@@ -869,7 +869,7 @@ class TestRCBP1 implements ITCFTest, IRunControl.RunControlListener {
}
public void contextException(String id, String msg) {
- if (threads.get(id) != null) exit(new Exception(msg));
+ if (threads.get(id) != null) exit(new Exception("Context exception: " + msg));
}
public void contextRemoved(String[] contexts) {

Back to the top