test/racc/test_racc_command.rb: Extend the timeout

test_opal, test_ruby18, and test_ruby22 are slow tests.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-ad7f67/ruby-master/log/20190619T105405Z.fail.html.gz
This commit is contained in:
Yusuke Endoh 2019-06-19 23:10:40 +09:00
parent 2abe548f35
commit 65944e96d3
2 changed files with 9 additions and 9 deletions

View File

@ -42,7 +42,7 @@ module Racc
end end
end end
def assert_compile(asset, args = []) def assert_compile(asset, args = [], **opt)
file = File.basename(asset, '.y') file = File.basename(asset, '.y')
args = ([args].flatten) + [ args = ([args].flatten) + [
"#{ASSET_DIR}/#{file}.y", "#{ASSET_DIR}/#{file}.y",
@ -50,7 +50,7 @@ module Racc
"-O#{OUT_DIR}/#{file}", "-O#{OUT_DIR}/#{file}",
"-o#{TAB_DIR}/#{file}", "-o#{TAB_DIR}/#{file}",
] ]
racc *args racc *args, **opt
end end
def assert_debugfile(asset, ok) def assert_debugfile(asset, ok)
@ -91,12 +91,12 @@ module Racc
"expectation. Try compiling it and diff with test/regress/#{file}.") "expectation. Try compiling it and diff with test/regress/#{file}.")
end end
def racc(*arg) def racc(*arg, **opt)
ruby "-S", RACC, *arg ruby "-S", RACC, *arg, **opt
end end
def ruby(*arg) def ruby(*arg, **opt)
assert_ruby_status(["-C", TEMP_DIR, *arg]) assert_ruby_status(["-C", TEMP_DIR, *arg], **opt)
end end
end end
end end

View File

@ -164,13 +164,13 @@ module Racc
# .y files from `parser` gem # .y files from `parser` gem
def test_ruby18 def test_ruby18
assert_compile 'ruby18.y' assert_compile 'ruby18.y', [], timeout: 60
assert_debugfile 'ruby18.y', [] assert_debugfile 'ruby18.y', []
# assert_output_unchanged 'ruby18.y' # assert_output_unchanged 'ruby18.y'
end end
def test_ruby22 def test_ruby22
assert_compile 'ruby22.y' assert_compile 'ruby22.y', [], timeout: 60
assert_debugfile 'ruby22.y', [] assert_debugfile 'ruby22.y', []
# assert_output_unchanged 'ruby22.y' # assert_output_unchanged 'ruby22.y'
end end
@ -186,7 +186,7 @@ module Racc
# .y file from opal gem # .y file from opal gem
def test_opal def test_opal
assert_compile 'opal.y' assert_compile 'opal.y', [], timeout: 60
assert_debugfile 'opal.y', [] assert_debugfile 'opal.y', []
# assert_output_unchanged 'opal.y' # assert_output_unchanged 'opal.y'
end end