You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2019/10/05 09:48:03 UTC
[arrow] 24/45: ARROW-6777: [GLib][CI] Unpin gobject-introspection
gem
This is an automated email from the ASF dual-hosted git repository.
kszucs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit c379f22f653e1fc0ea477ab5e26ca7eb1f3a4e24
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Thu Oct 3 14:46:52 2019 +0900
ARROW-6777: [GLib][CI] Unpin gobject-introspection gem
gobject-introspection gem 3.3.8 or later is needed for GLib 2.62.0 or
later. But gobject-introspection gem 3.3.8 has some problems.
This change omits tests that are affected by these problems.
Closes #5572 from kou/glib-unpin-gobject-introspection and squashes the following commits:
715b6d41d <Sutou Kouhei> Unpin gobject-introspection gem
Authored-by: Sutou Kouhei <ko...@clear-code.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
c_glib/Gemfile | 2 +-
c_glib/test/plasma/test-plasma-client.rb | 1 +
c_glib/test/plasma/test-plasma-created-object.rb | 3 +++
c_glib/test/plasma/test-plasma-referred-object.rb | 3 +++
c_glib/test/test-cuda.rb | 2 ++
ruby/red-arrow/red-arrow.gemspec | 2 +-
ruby/red-plasma/test/helper.rb | 1 +
.../test/{helper.rb => helper/omittable.rb} | 24 ++++++++++++++++------
ruby/red-plasma/test/test-plasma-client.rb | 3 +++
9 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/c_glib/Gemfile b/c_glib/Gemfile
index f42c185..4b57090 100644
--- a/c_glib/Gemfile
+++ b/c_glib/Gemfile
@@ -20,4 +20,4 @@
source "https://rubygems.org/"
gem "test-unit"
-gem "gobject-introspection", "= 3.3.7"
+gem "gobject-introspection"
diff --git a/c_glib/test/plasma/test-plasma-client.rb b/c_glib/test/plasma/test-plasma-client.rb
index a57d1fc..14c65b4 100644
--- a/c_glib/test/plasma/test-plasma-client.rb
+++ b/c_glib/test/plasma/test-plasma-client.rb
@@ -21,6 +21,7 @@ class TestPlasmaClient < Test::Unit::TestCase
def setup
@store = nil
omit("Plasma is required") unless defined?(::Plasma)
+ require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@options = Plasma::ClientOptions.new
diff --git a/c_glib/test/plasma/test-plasma-created-object.rb b/c_glib/test/plasma/test-plasma-created-object.rb
index 857322d..8d036cd 100644
--- a/c_glib/test/plasma/test-plasma-created-object.rb
+++ b/c_glib/test/plasma/test-plasma-created-object.rb
@@ -16,9 +16,12 @@
# under the License.
class TestPlasmaCreatedObject < Test::Unit::TestCase
+ include Helper::Omittable
+
def setup
@store = nil
omit("Plasma is required") unless defined?(::Plasma)
+ require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@client = Plasma::Client.new(@store.socket_path, nil)
diff --git a/c_glib/test/plasma/test-plasma-referred-object.rb b/c_glib/test/plasma/test-plasma-referred-object.rb
index a74641e..ef4c72a 100644
--- a/c_glib/test/plasma/test-plasma-referred-object.rb
+++ b/c_glib/test/plasma/test-plasma-referred-object.rb
@@ -16,9 +16,12 @@
# under the License.
class TestPlasmaReferredObject < Test::Unit::TestCase
+ include Helper::Omittable
+
def setup
@store = nil
omit("Plasma is required") unless defined?(::Plasma)
+ require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@client = Plasma::Client.new(@store.socket_path, nil)
diff --git a/c_glib/test/test-cuda.rb b/c_glib/test/test-cuda.rb
index ae91530..d24bab6 100644
--- a/c_glib/test/test-cuda.rb
+++ b/c_glib/test/test-cuda.rb
@@ -17,6 +17,7 @@
class TestCUDA < Test::Unit::TestCase
include Helper::Buildable
+ include Helper::Omittable
def setup
omit("Arrow CUDA is required") unless defined?(::ArrowCUDA)
@@ -47,6 +48,7 @@ class TestCUDA < Test::Unit::TestCase
end
def test_export
+ require_gi_bindings(3, 3, 9)
@buffer.copy_from_host("Hello World")
handle = @buffer.export
serialized_handle = handle.serialize.data
diff --git a/ruby/red-arrow/red-arrow.gemspec b/ruby/red-arrow/red-arrow.gemspec
index 75430b5..f4fcda9 100644
--- a/ruby/red-arrow/red-arrow.gemspec
+++ b/ruby/red-arrow/red-arrow.gemspec
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
spec.extensions = ["ext/arrow/extconf.rb"]
spec.add_runtime_dependency("extpp", ">= 0.0.7")
- spec.add_runtime_dependency("gio2", "= 3.3.7")
+ spec.add_runtime_dependency("gio2", ">= 3.3.6")
spec.add_runtime_dependency("native-package-installer")
spec.add_runtime_dependency("pkg-config")
diff --git a/ruby/red-plasma/test/helper.rb b/ruby/red-plasma/test/helper.rb
index 255cad2..02c545f 100644
--- a/ruby/red-plasma/test/helper.rb
+++ b/ruby/red-plasma/test/helper.rb
@@ -21,4 +21,5 @@ require "tempfile"
require "test-unit"
+require_relative "helper/omittable"
require_relative "helper/plasma-store"
diff --git a/ruby/red-plasma/test/helper.rb b/ruby/red-plasma/test/helper/omittable.rb
similarity index 56%
copy from ruby/red-plasma/test/helper.rb
copy to ruby/red-plasma/test/helper/omittable.rb
index 255cad2..a1c0334 100644
--- a/ruby/red-plasma/test/helper.rb
+++ b/ruby/red-plasma/test/helper/omittable.rb
@@ -15,10 +15,22 @@
# specific language governing permissions and limitations
# under the License.
-require "plasma"
+module Helper
+ module Omittable
+ def require_gi_bindings(major, minor, micro)
+ return if GLib.check_binding_version?(major, minor, micro)
+ message =
+ "Require gobject-introspection #{major}.#{minor}.#{micro} or later: " +
+ GLib::BINDING_VERSION.join(".")
+ omit(message)
+ end
-require "tempfile"
-
-require "test-unit"
-
-require_relative "helper/plasma-store"
+ def require_gi(major, minor, micro)
+ return if GObjectIntrospection::Version.or_later?(major, minor, micro)
+ message =
+ "Require GObject Introspection #{major}.#{minor}.#{micro} or later: " +
+ GObjectIntrospection::Version::STRING
+ omit(message)
+ end
+ end
+end
diff --git a/ruby/red-plasma/test/test-plasma-client.rb b/ruby/red-plasma/test/test-plasma-client.rb
index de76fb9..d618297 100644
--- a/ruby/red-plasma/test/test-plasma-client.rb
+++ b/ruby/red-plasma/test/test-plasma-client.rb
@@ -16,8 +16,11 @@
# under the License.
class TestPlasmaClient < Test::Unit::TestCase
+ include Helper::Omittable
+
def setup
@store = nil
+ require_gi_bindings(3, 3, 9)
@store = Helper::PlasmaStore.new
@store.start
@id = Plasma::ObjectID.new("Hello")