qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [2/2] qpid-proton git commit: PROTON-1560: ruby: fix cmake test names
Date Mon, 02 Oct 2017 14:32:59 GMT
PROTON-1560: ruby: fix cmake test names


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

Branch: refs/heads/master
Commit: 9729f3bd954432c62039a0e3fb11a0cb144337ab
Parents: 7329617
Author: Alan Conway <aconway@redhat.com>
Authored: Fri Sep 29 09:46:59 2017 -0400
Committer: Alan Conway <aconway@redhat.com>
Committed: Mon Oct 2 10:30:50 2017 -0400

----------------------------------------------------------------------
 proton-c/bindings/ruby/CMakeLists.txt | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9729f3bd/proton-c/bindings/ruby/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/CMakeLists.txt b/proton-c/bindings/ruby/CMakeLists.txt
index 2c50027a..24e16d5 100644
--- a/proton-c/bindings/ruby/CMakeLists.txt
+++ b/proton-c/bindings/ruby/CMakeLists.txt
@@ -101,20 +101,21 @@ execute_process(COMMAND ${RUBY_EXECUTABLE} -r minitest -e ""
   RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
 if (result EQUAL 0)  # Have minitest
 
-  macro(add_ruby_test name file)
+  macro(add_ruby_test file)
+    get_filename_component(name ${file} NAME_WE)
+    string(REPLACE "_" "-" name "ruby-${name}")
     add_test(
       NAME ${name}
-      ${ARGN}
-      COMMAND ${RUBY_EXECUTABLE} ${file} -v)
+      COMMAND ${RUBY_EXECUTABLE} ${file} -v
+      ${ARGN})
     set_tests_properties(${name} PROPERTIES ENVIRONMENT "PATH=${PATH};RUBYLIB=${RUBYLIB}")
   endmacro()
-
-  add_ruby_test(ruby-example-test example_test.rb WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/examples/ruby)
+  add_ruby_test(example_test.rb WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/examples/ruby)
 
   file(GLOB TESTS tests/test_*.rb)
   file(GLOB SPECS spec/*_spec.rb)
   foreach(t ${TESTS} ${SPECS})
-    add_ruby_test("ruby-${t}" ${t})
+    add_ruby_test(${t})
   endforeach()
 else()
   # No minitest


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


Mime
View raw message