PROTON-881: Only try interoperation tests with proton-j if proton-j has been 
built!


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/7faa7e23
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/7faa7e23
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/7faa7e23

Branch: refs/heads/proton-j-reactor
Commit: 7faa7e2322c4782b9acc173194dc8bb1887a5a89
Parents: 2e6f5cd
Author: Adrian Preston <[email protected]>
Authored: Thu Apr 30 14:51:46 2015 +0100
Committer: Adrian Preston <[email protected]>
Committed: Wed May 6 23:24:19 2015 +0100

----------------------------------------------------------------------
 tests/python/proton_tests/reactor_interop.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7faa7e23/tests/python/proton_tests/reactor_interop.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/reactor_interop.py 
b/tests/python/proton_tests/reactor_interop.py
index 9c58d03..b2604db 100644
--- a/tests/python/proton_tests/reactor_interop.py
+++ b/tests/python/proton_tests/reactor_interop.py
@@ -63,7 +63,19 @@ class ReceiveHandler:
 
 class ReactorInteropTest(Test):
 
+  def setup(self):
+    classpath = ""
+    if ('CLASSPATH' in os.environ):
+      classpath = os.environ['CLASSPATH']
+    entries = classpath.split(os.sep)
+    self.proton_j_available = len(entries) > 0
+    for entry in entries:
+      self.proton_j_available |= os.path.exists(entry)
+
   def protonj_to_protonc(self, count):
+    if (not self.proton_j_available):
+      raise Skip()
+
     rh = ReceiveHandler(count)
     r = Reactor(rh)
     r.run()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to