Skip to content

Commit 3ab9d93

Browse files
committed
Ignore ffi-zmq related tests.
Disable ffi-rzmq test suites for now since it is currently not available in Fedora.
1 parent d45cfd6 commit 3ab9d93

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

rubygem-protobuf.spec

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,43 @@ sed -i -e '/require .pry./ s/^/#/g' \
6363
-e '/^Bundler\./ s/^/#/g' \
6464
spec/spec_helper.rb
6565

66+
# ffi-rzmq is not in fedora
67+
# Removing the require does not seem to affect the test suite anyway
68+
# as long as we require the correct file.
69+
sed -i -e "s/require .protobuf\/zmq./require 'protobuf\/rpc\/connectors\/ping'/g" \
70+
spec/lib/protobuf/rpc/connectors/ping_spec.rb
71+
72+
# This test fails only without access to internet.
73+
sed -i -e '/context .when a select timeout is fired./,/^ end$/ s/^/#/' \
74+
spec/lib/protobuf/rpc/connectors/ping_spec.rb
75+
76+
# There is not currently a ffi-rzmq gem in Fedora,
77+
# let's disable test suites testing the rzmq capability.
78+
for file in spec/lib/protobuf/rpc/servers/zmq/server_spec.rb \
79+
spec/lib/protobuf/rpc/servers/zmq/util_spec.rb \
80+
spec/functional/zmq_server_spec.rb \
81+
spec/lib/protobuf/rpc/connectors/zmq_spec.rb ; do
82+
83+
mv $file{,.bak}
84+
done
85+
86+
sed -i -e "/context ..*zmq.*. do/,/^ end$/ s/^/#/g" spec/lib/protobuf/cli_spec.rb
87+
6688
rspec spec
6789
popd
6890

6991
%files
7092
%dir %{gem_instdir}
7193
%{_bindir}/protoc-gen-ruby
7294
%{_bindir}/rpc_server
73-
%exclude %{gem_instdir}/.*
7495
%license %{gem_instdir}/LICENSE.txt
7596
%{gem_instdir}/bin
7697
%{gem_libdir}
7798
%{gem_instdir}/profile.html
7899
%{gem_instdir}/proto
79100
%{gem_instdir}/varint_prof.rb
80101
%exclude %{gem_cache}
102+
%exclude %{gem_instdir}/.*
81103
%{gem_spec}
82104

83105
%files doc

0 commit comments

Comments
 (0)