NO-JIRA: fix the search for proton-j in the interopt test

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

Branch: refs/heads/cjansen-cpp-client
Commit: 09af37524ee71951e27e4af883eaac2fdffc3f19
Parents: 898cc0a
Author: Ken Giusti <kgiu...@apache.org>
Authored: Tue Jul 7 10:16:03 2015 -0400
Committer: Ken Giusti <kgiu...@apache.org>
Committed: Tue Jul 7 10:16:03 2015 -0400

----------------------------------------------------------------------
 proton-c/CMakeLists.txt                      |  8 +++++---
 tests/python/proton_tests/reactor_interop.py | 12 ++++++------
 2 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/09af3752/proton-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index 72f8d6a..93449a9 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -521,10 +521,12 @@ if (BUILD_PYTHON)
          to_native_path ("${py_path}" py_path)
          to_native_path ("${py_pythonpath}" py_pythonpath)
          add_test (NAME python-tox-test
+                  WORKING_DIRECTORY ${py_src}
                    COMMAND ${env_py}
-                  "PATH=${py_path}" 
"QPID_PROTON_SRC=${CMAKE_CURRENT_SOURCE_DIR}/../" ${VALGRIND_ENV}
-                   tox
-                  WORKING_DIRECTORY ${py_src})
+                  "PATH=${py_path}" 
"QPID_PROTON_SRC=${CMAKE_CURRENT_SOURCE_DIR}/../"
+                   "CLASSPATH=${CMAKE_BINARY_DIR}/proton-j/proton-j.jar"
+                   ${VALGRIND_ENV}
+                   tox)
          set_tests_properties(python-tox-test
                               PROPERTIES
                               PASS_REGULAR_EXPRESSION "Totals: .* ignored, 0 
failed"

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/09af3752/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 f95d8c2..50284fd 100644
--- a/tests/python/proton_tests/reactor_interop.py
+++ b/tests/python/proton_tests/reactor_interop.py
@@ -19,7 +19,7 @@
 #
 from __future__ import absolute_import
 
-from .common import Test, free_tcp_port
+from .common import Test, free_tcp_port, Skipped
 from proton import Message
 from proton.handlers import CHandshaker, CFlowController
 from proton.reactor import Reactor
@@ -101,14 +101,14 @@ class ReactorInteropTest(Test):
     classpath = ""
     if ('CLASSPATH' in os.environ):
       classpath = os.environ['CLASSPATH']
-    entries = classpath.split(os.sep)
-    self.proton_j_available = len(entries) > 0
+    entries = classpath.split(os.pathsep)
+    self.proton_j_available = False
     for entry in entries:
-      self.proton_j_available |= os.path.exists(entry)
+      self.proton_j_available |= entry != "" and os.path.exists(entry)
 
   def protonc_to_protonj(self, count):
     if (not self.proton_j_available):
-      raise Skip()
+      raise Skipped("ProtonJ not found")
 
     port = free_tcp_port()
     java_thread = JavaThread("recv", port, count)
@@ -126,7 +126,7 @@ class ReactorInteropTest(Test):
 
   def protonj_to_protonc(self, count):
     if (not self.proton_j_available):
-      raise Skip()
+      raise Skipped("ProtonJ not found")
 
     rh = ReceiveHandler(count)
     r = Reactor(rh)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to