diff options
author | MSP-Greg <MSP-Greg@users.noreply.github.com> | 2019-12-31 01:19:31 -0600 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-01-30 13:34:24 +0900 |
commit | 44ef8af4fb0a793f020147e3f077cd061953c8fa (patch) | |
tree | 1736876530e473b07ede15f450f230f843f587d9 /test | |
parent | 6646c2b2ab7efd389075ad5f187b458c4bc138cc (diff) |
MinGW on Actions (#2791)
* MinGW - skip spec in spec/ruby/optional/capi/thread_spec.rb
C-API Thread function rb_thread_call_without_gvl
-- runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO
stops/freezes spec tests
See https://bugs.ruby-lang.org/issues/16265
* MinGW - skip test test/resolv/test_dns.rb
Test times out in CI (both AppVeyor & Actions), cannot repo locally
* MinGW - skip test test/ruby/test_thread_queue.rb
* Add Actions mingw.yml
Diffstat (limited to 'test')
-rw-r--r-- | test/resolv/test_dns.rb | 17 | ||||
-rw-r--r-- | test/ruby/test_thread_queue.rb | 4 |
2 files changed, 17 insertions, 4 deletions
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb index d69bec8256..70d5067750 100644 --- a/test/resolv/test_dns.rb +++ b/test/resolv/test_dns.rb @@ -162,10 +162,19 @@ class TestResolvDNS < Test::Unit::TestCase # A race condition here. # Another program may use the port. # But no way to prevent it. - Timeout.timeout(5) do - Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns| - assert_equal([], dns.getresources("test-no-server.example.org", Resolv::DNS::Resource::IN::A)) - } + begin + Timeout.timeout(5) do + Resolv::DNS.open(:nameserver_port => [[host, port]]) {|dns| + assert_equal([], dns.getresources("test-no-server.example.org", Resolv::DNS::Resource::IN::A)) + } + end + rescue Timeout::Error + if RUBY_PLATFORM.match?(/mingw/) + # cannot repo locally + skip 'Timeout Error on MinGW CI' + else + raise Timeout::Error + end end end diff --git a/test/ruby/test_thread_queue.rb b/test/ruby/test_thread_queue.rb index e46f0b2e8e..41e6865ed4 100644 --- a/test/ruby/test_thread_queue.rb +++ b/test/ruby/test_thread_queue.rb @@ -560,6 +560,10 @@ class TestThreadQueue < Test::Unit::TestCase if ENV['APPVEYOR'] == 'True' && RUBY_PLATFORM.match?(/mswin/) skip 'This test fails too often on AppVeyor vs140' end + if RUBY_PLATFORM.match?(/mingw/) + skip 'This test fails too often on MinGW' + end + assert_in_out_err([], <<-INPUT, %w(INT INT exit), []) q = Queue.new trap(:INT){ |