Details
-
Improvement
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Restore the following tests to the ruby/CMakeLists.txt section that builds a gem:
# Test installing the gem. to_native_path("${bin}/install" gem_home) set(gem_env ${env_py} -- "GEM_HOME=${gem_home}" "LD_LIBRARY_PATH=${c_lib_dir}") add_test( NAME ruby-gem-install COMMAND ${gem_env} ${GEM_EXE} install "${GEM_FILE}" -- "--with-qpid-proton-include=${CMAKE_SOURCE_DIR}/proton-c/include" "--with-qpid-proton-lib=${c_lib_dir}" ) # Test running examples against the installed gem add_test( NAME ruby-gem-examples COMMAND ${gem_env} ${RUBY_EXECUTABLE} example_test.rb -v WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/examples/ruby ) SET_TESTS_PROPERTIES(ruby-gem-examples PROPERTIES DEPENDS ruby-gem-install) # Run after install
This works on some platforms (fedora 26) but fails on Travis CI builds in the ruby-gem-examples test, e.g.
https://travis-ci.org/alanconway/qpid-proton/jobs/342502018
Doesn't seem to indicate a problem with the Gem, but rather with the test setup. The error is like this:
2: Test command: /opt/pyenv/shims/python "/home/travis/build/alanconway/qpid-proton/proton-c/env.py" "--" "GEM_HOME=/home/travis/build/alanconway/qpid-proton/build/proton-c/bindings/ruby/install" "LD_LIBRARY_PATH=/home/travis/build/alanconway/qpid-proton/build/proton-c" "/home/travis/.rvm/rubies/ruby-2.4.1/bin/ruby" "example_test.rb" "-v" 2: Test timeout computed to be: 1500 2: /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': incompatible library version - /home/travis/build/alanconway/qpid-proton/build/proton-c/bindings/ruby/install/gems/qpid_proton-0.21.0/lib/cproton.so (LoadError) 2: from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' 2: from /home/travis/build/alanconway/qpid-proton/build/proton-c/bindings/ruby/install/gems/qpid_proton-0.21.0/lib/qpid_proton.rb:19:in `<top (required)>' 2: from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require' 2: from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require' 2: from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require' 2: from example_test.rb:22:in `<main>' 2/32 Test #2: ruby-gem-examples ................***Failed 0.15 sec