You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2017/01/06 17:39:27 UTC

[1/2] qpid-interop-test git commit: QPIDIT-57 QPIDIT-62: Added mechanism to disable shims if they are not installed. Added cmake file for detecting node.js and npm for Rhea and disabling install if not found. Fixed minor cmake problem in AMQP DotNetLite

Repository: qpid-interop-test
Updated Branches:
  refs/heads/master 8b71071f8 -> 26faaadf2


QPIDIT-57 QPIDIT-62: Added mechanism to disable shims if they are not installed. Added cmake file for detecting node.js and npm for Rhea and disabling install if not found. Fixed minor cmake problem in AMQP DotNetLite cmake script


Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/456a3496
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/456a3496
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/456a3496

Branch: refs/heads/master
Commit: 456a3496b29154f7a6d1b953e1fe36c8ceebce02
Parents: 99af3b2
Author: Kim van der Riet <kp...@apache.org>
Authored: Fri Jan 6 12:31:24 2017 -0500
Committer: Kim van der Riet <kp...@apache.org>
Committed: Fri Jan 6 12:31:24 2017 -0500

----------------------------------------------------------------------
 CMakeLists.txt                                  | 12 ++---
 setup.py                                        |  3 --
 shims/amqpnetlite/src/CMakeLists.txt            |  2 +-
 shims/rhea-js/CMakeLists.txt                    | 55 ++++++++++++++++++++
 src/python/qpid_interop_test/amqp_types_test.py | 17 ++++--
 5 files changed, 74 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/456a3496/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15ec1b4..5665e17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,7 @@ set(PROTON_INSTALL_DIR "/usr/local/qpid-proton" CACHE PATH "Proton install direc
 
 add_subdirectory(shims/qpid-proton-cpp/src)
 add_subdirectory(shims/amqpnetlite/src)
+add_subdirectory(shims/rhea-js)
 
 # Build Java code
 install(CODE "execute_process(COMMAND mvn -DskipTests install
@@ -33,6 +34,10 @@ install(CODE "execute_process(COMMAND mvn -DskipTests install
 # Install files using python setup.py
 install(CODE "execute_process(COMMAND python setup.py install --prefix ${CMAKE_INSTALL_PREFIX}
                               WORKING_DIRECTORY ../)")
+
+# TODO: THIS IS UGLY!
+# Find a way to handle this as part of the Python install process instead
+# Set the following Python scripts to executable:
 install(CODE "execute_process(COMMAND chmod +x amqp_large_content_test.py
                                                amqp_types_test.py
                                                jms_hdrs_props_test.py
@@ -50,10 +55,3 @@ install(CODE "execute_process(COMMAND chmod +x Receiver.py
 install(CODE "execute_process(COMMAND chmod +x Receiver.py
                                                Sender.py
                               WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/python2.7/site-packages/qpid_interop_test/shims/qpid-proton-python/jms_messages_test/)")
-
-# Install Rhea client dependencies
-install(CODE "execute_process(COMMAND npm install node-uuid
-                              WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/python2.7/site-packages/qpid_interop_test/shims/rhea-js/)")
-install(CODE "execute_process(COMMAND npm link rhea
-                              WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/python2.7/site-packages/qpid_interop_test/shims/rhea-js/)")
-                              

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/456a3496/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index ab58998..7e56f0e 100644
--- a/setup.py
+++ b/setup.py
@@ -59,8 +59,5 @@ setup(name='qpid-interop-test',
                                                                  'build/jms_hdrs_props_test/Sender',
                                                                 ],
                   ),
-                  ('%s/rhea-js/amqp_types_test' % SHIM_DIR, ['shims/rhea-js/amqp_types_test/Receiver.js',
-                                                     'shims/rhea-js/amqp_types_test/Sender.js'],
-                  ),
                  ],
      )

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/456a3496/shims/amqpnetlite/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shims/amqpnetlite/src/CMakeLists.txt b/shims/amqpnetlite/src/CMakeLists.txt
index 8b52d98..ee27dc8 100644
--- a/shims/amqpnetlite/src/CMakeLists.txt
+++ b/shims/amqpnetlite/src/CMakeLists.txt
@@ -34,7 +34,7 @@ set(lite_default ON)
 
 find_program(PROG_MONO mono)
 
-if (PROG_MONO-NOTFOUND)
+if (PROG_MONO STREQUAL "PROG_MONO-NOTFOUND")
   message(STATUS "Program 'mono' is not found. AMQP.Net Lite shim requires mono.")
   set(lite_default OFF)
 else ()

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/456a3496/shims/rhea-js/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shims/rhea-js/CMakeLists.txt b/shims/rhea-js/CMakeLists.txt
new file mode 100644
index 0000000..ac14232
--- /dev/null
+++ b/shims/rhea-js/CMakeLists.txt
@@ -0,0 +1,55 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Building Rhea requires that node.js is installed.
+
+project(qpid-interop-test-rhea-shims)
+message(STATUS "Searching for Rhea shim build and run requirements...")
+
+find_program(PROG_NODE node)
+find_program(PROG_NPM npm)
+if ((PROG_NODE STREQUAL "PROG_NODE-NOTFOUND") OR (PROG_NPM STREQUAL "PROG_NPM-NOTFOUND"))
+  message(STATUS "Programs 'node' and/or 'npm' were not found. Rhea Javascript shim requires both of these.")
+  # Set option that controls the build process
+  option(BUILD_RHEA "Build Rhea Javascript shim" OFF)
+else ()
+  execute_process(COMMAND node --version OUTPUT_VARIABLE node_ver)
+  string(REGEX REPLACE "\n$" "" node_ver "${node_ver}") # Strip trailing newline
+  message(STATUS "node ${node_ver} found")
+  execute_process(COMMAND npm --version OUTPUT_VARIABLE npm_ver)
+  string(REGEX REPLACE "\n$" "" npm_ver "${npm_ver}") # Strip trailing newline
+  message(STATUS "npm ${npm_ver} found")
+  # Set option that controls the build process
+  option(BUILD_RHEA "Build Rhea Javascript shim" ON)
+endif()
+message(STATUS "BUILD_RHEA = ${BUILD_RHEA}")
+
+if (${BUILD_RHEA})
+  # Install Rhea client dependencies
+  set(SHIM_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/python2.7/site-packages/qpid_interop_test/shims/rhea-js/)
+  install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/amqp_types_test/Receiver.js
+          DESTINATION ${SHIM_INSTALL_PATH}/amqp_types_test/)
+  install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/amqp_types_test/Sender.js
+          DESTINATION ${SHIM_INSTALL_PATH}/amqp_types_test/)
+  install(CODE "execute_process(COMMAND npm install node-uuid
+                                WORKING_DIRECTORY ${SHIM_INSTALL_PATH})")
+  install(CODE "execute_process(COMMAND npm link rhea
+                                WORKING_DIRECTORY ${SHIM_INSTALL_PATH})")
+endif()
+                              
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/456a3496/src/python/qpid_interop_test/amqp_types_test.py
----------------------------------------------------------------------
diff --git a/src/python/qpid_interop_test/amqp_types_test.py b/src/python/qpid_interop_test/amqp_types_test.py
index 55b17c4..feb9f4f 100755
--- a/src/python/qpid_interop_test/amqp_types_test.py
+++ b/src/python/qpid_interop_test/amqp_types_test.py
@@ -458,11 +458,20 @@ if __name__ == '__main__':
                     qpid_interop_test.shims.ProtonCppShim(PROTON_CPP_SENDER_SHIM, PROTON_CPP_RECEIVER_SHIM),
                 qpid_interop_test.shims.ProtonPythonShim.NAME: \
                     qpid_interop_test.shims.ProtonPythonShim(PROTON_PYTHON_SENDER_SHIM, PROTON_PYTHON_RECEIVER_SHIM),
-                qpid_interop_test.shims.RheaJsShim.NAME: \
-                    qpid_interop_test.shims.RheaJsShim(PROTON_RHEAJS_SENDER_SHIM, PROTON_RHEAJS_RECEIVER_SHIM),
-                qpid_interop_test.shims.AmqpNetLiteShim.NAME: \
-                    qpid_interop_test.shims.AmqpNetLiteShim(AMQPNETLITE_SENDER_SHIM, AMQPNETLITE_RECEIVER_SHIM),
                }
+    # Add shims that need detection during installation only if the necessary bits are present
+    # Rhea Javascript client
+    if path.isfile(PROTON_RHEAJS_RECEIVER_SHIM) and path.isfile(PROTON_RHEAJS_SENDER_SHIM):
+        SHIM_MAP[qpid_interop_test.shims.RheaJsShim.NAME] = \
+            qpid_interop_test.shims.RheaJsShim(PROTON_RHEAJS_SENDER_SHIM, PROTON_RHEAJS_RECEIVER_SHIM)
+    else:
+        print 'WARNING: Rhea Javascript shims not installed'
+    # AMQP DotNetLite client
+    if path.isfile(AMQPNETLITE_RECEIVER_SHIM) and path.isfile(AMQPNETLITE_SENDER_SHIM):
+        SHIM_MAP[qpid_interop_test.shims.AmqpNetLiteShim.NAME] = \
+            qpid_interop_test.shims.AmqpNetLiteShim(AMQPNETLITE_SENDER_SHIM, AMQPNETLITE_RECEIVER_SHIM)
+    else:
+        print 'WARNING: AMQP DotNetLite shims not installed'
 
     ARGS = TestOptions(SHIM_MAP).args
     #print 'ARGS:', ARGS # debug


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


[2/2] qpid-interop-test git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/qpid-interop-test

Posted by kp...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/qpid-interop-test


Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/26faaadf
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/26faaadf
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/26faaadf

Branch: refs/heads/master
Commit: 26faaadf27d6e039bffe682e5d31cd868a781508
Parents: 456a349 8b71071
Author: Kim van der Riet <kp...@apache.org>
Authored: Fri Jan 6 12:31:53 2017 -0500
Committer: Kim van der Riet <kp...@apache.org>
Committed: Fri Jan 6 12:31:53 2017 -0500

----------------------------------------------------------------------
 shims/amqpnetlite/src/CMakeLists.txt | 32 ++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/26faaadf/shims/amqpnetlite/src/CMakeLists.txt
----------------------------------------------------------------------


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