diff options
author | eutarass | 2010-07-09 21:02:20 +0000 |
---|---|---|
committer | eutarass | 2010-07-09 21:02:20 +0000 |
commit | f443f3f4b07ed4dcf1afcf2f7d01bcff3aa31dc9 (patch) | |
tree | 3754bcae3c1df4dc45bde1f0ae97bc55afef95b4 /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse | |
parent | 57b00696a4ca1c08e0d5ca682ce73d2f9269b1a4 (diff) | |
download | org.eclipse.tcf-f443f3f4b07ed4dcf1afcf2f7d01bcff3aa31dc9.tar.gz org.eclipse.tcf-f443f3f4b07ed4dcf1afcf2f7d01bcff3aa31dc9.tar.xz org.eclipse.tcf-f443f3f4b07ed4dcf1afcf2f7d01bcff3aa31dc9.zip |
TCF Tests: added Breakpoints service capabilities checks
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse')
-rw-r--r-- | plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java | 30 |
1 files changed, 28 insertions, 2 deletions
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 cecf22dad..5832f5d30 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 @@ -61,6 +61,7 @@ class TestRCBP1 implements ITCFTest, IRunControl.RunControlListener { private String test_ctx_id; // Test context ID private IRunControl.RunControlContext test_context; private String main_thread_id; + private Map<String,Object> bp_capabilities; private Runnable pending_cancel; private int bp_cnt = 0; private boolean done_get_state; @@ -199,6 +200,29 @@ class TestRCBP1 implements ITCFTest, IRunControl.RunControlListener { }); return; } + if (bp_capabilities == null) { + bp.getCapabilities(test_ctx_id, new IBreakpoints.DoneGetCapabilities() { + public void doneGetCapabilities(IToken token, Exception error, Map<String, Object> capabilities) { + if (error != null) { + exit(error); + return; + } + Boolean l = (Boolean)capabilities.get(IBreakpoints.CAPABILITY_LOCATION); + Boolean c = (Boolean)capabilities.get(IBreakpoints.CAPABILITY_CONDITION); + if (l == null || !l) { + exit(new Exception("Breakpoints service does not support \"Location\" attribute")); + return; + } + if (c == null || !c) { + exit(new Exception("Breakpoints service does not support \"Condition\" attribute")); + return; + } + bp_capabilities = capabilities; + runTest(); + } + }); + return; + } if (!bp_set_done) { iniBreakpoints(); return; @@ -457,8 +481,10 @@ class TestRCBP1 implements ITCFTest, IRunControl.RunControlListener { final Map<String,Object> m = bp_list.get(bp_id); ArrayList<String> l = new ArrayList<String>(); l.add(test_context.getProcessID()); - m.put(IBreakpoints.PROP_CONTEXTIDS, l); - m.put(IBreakpoints.PROP_STOP_GROUP, l); + Boolean ci = (Boolean)bp_capabilities.get(IBreakpoints.CAPABILITY_CONTEXTIDS); + if (ci != null && ci) m.put(IBreakpoints.PROP_CONTEXTIDS, l); + Boolean sg = (Boolean)bp_capabilities.get(IBreakpoints.CAPABILITY_STOP_GROUP); + if (sg != null && sg) m.put(IBreakpoints.PROP_STOP_GROUP, l); StringBuffer bf = new StringBuffer(); for (String id : threads.keySet()) { if (bf.length() > 0) bf.append(" || "); |