Skip to content

Commit

Permalink
omit all assertions at TestIO_Console#test_intr when running with Fre…
Browse files Browse the repository at this point in the history
…eBSD
  • Loading branch information
hsbt committed Sep 8, 2022
1 parent dcaaa29 commit c81a2a6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/io/console/test_io_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ def assert_ctrl(expect, cc, r, w)
end

def test_intr
# This test fails randomly on FreeBSD 13
# http://rubyci.s3.amazonaws.com/freebsd13/ruby-master/log/20220304T163001Z.fail.html.gz
#
# 1) Failure:
# TestIO_Console#test_intr [/usr/home/chkbuild/chkbuild/tmp/build/20220304T163001Z/ruby/test/io/console/test_io_console.rb:387]:
# <"25"> expected but was
# <"-e:12:in `p': \e[1mexecution expired (\e[1;4mTimeout::Error\e[m\e[1m)\e[m">.
omit if /freebsd/ =~ RUBY_PLATFORM

run_pty("#{<<~"begin;"}\n#{<<~'end;'}") do |r, w, _|
begin;
require 'timeout'
Expand All @@ -383,19 +392,12 @@ def test_intr
assert_ctrl("#{cc.ord}", cc, r, w)
assert_ctrl("Interrupt", cc, r, w) unless /linux|solaris/ =~ RUBY_PLATFORM
end
# This test fails randomly on FreeBSD 13
# http://rubyci.s3.amazonaws.com/freebsd13/ruby-master/log/20220304T163001Z.fail.html.gz
#
# 1) Failure:
# TestIO_Console#test_intr [/usr/home/chkbuild/chkbuild/tmp/build/20220304T163001Z/ruby/test/io/console/test_io_console.rb:387]:
# <"25"> expected but was
# <"-e:12:in `p': \e[1mexecution expired (\e[1;4mTimeout::Error\e[m\e[1m)\e[m">.
if (cc = ctrl["dsusp"]) && /freebsd/ !~ RUBY_PLATFORM
if cc = ctrl["dsusp"]
assert_ctrl("#{cc.ord}", cc, r, w)
assert_ctrl("#{cc.ord}", cc, r, w)
assert_ctrl("#{cc.ord}", cc, r, w)
end
if (cc = ctrl["lnext"]) && /freebsd/ !~ RUBY_PLATFORM
if cc = ctrl["lnext"]
assert_ctrl("#{cc.ord}", cc, r, w)
assert_ctrl("#{cc.ord}", cc, r, w)
assert_ctrl("#{cc.ord}", cc, r, w)
Expand Down

0 comments on commit c81a2a6

Please sign in to comment.