diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-15 21:59:37 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-15 21:59:37 +0000 |
commit | 9c66bad9f3d522d50d4a45ef8a3a92abbf93229f (patch) | |
tree | 8fc1ae219e41bdd711442b1d35149da4f45dfa8a /test/rake/test_rake_functional.rb | |
parent | bfc95c6e1639edc909338ef4d20d990caf6f630e (diff) |
* lib/rake*: Updated to rake 0.9.3
* test/rake*: ditto
* bin/rake: ditto
* NEWS: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_functional.rb')
-rw-r--r-- | test/rake/test_rake_functional.rb | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/test/rake/test_rake_functional.rb b/test/rake/test_rake_functional.rb index 3764709f38..ad59f7b9f8 100644 --- a/test/rake/test_rake_functional.rb +++ b/test/rake/test_rake_functional.rb @@ -5,8 +5,8 @@ require 'open3' class TestRakeFunctional < Rake::TestCase def setup - @rake_path = File.expand_path("../../../bin/rake", __FILE__) - lib_path = File.expand_path("../../../lib", __FILE__) + @rake_path = File.expand_path("bin/rake") + lib_path = File.expand_path("lib") @ruby_options = ["-I#{lib_path}", "-I."] @verbose = ENV['VERBOSE'] @@ -417,6 +417,28 @@ class TestRakeFunctional < Rake::TestCase assert_equal "1\n", @out end + def can_detect_signals? + system "ruby -e 'Process.kill \"TERM\", $$'" + status = $? + if @verbose + puts " SIG status = #{$?.inspect}" + puts " SIG status.respond_to?(:signaled?) = #{$?.respond_to?(:signaled?).inspect}" + puts " SIG status.signaled? = #{status.signaled?}" if status.respond_to?(:signaled?) + end + status.respond_to?(:signaled?) && status.signaled? + end + + def test_signal_propagation_in_tests + if can_detect_signals? + rakefile_test_signal + rake + assert_match(/ATEST/, @out) + refute_match(/BTEST/, @out) + else + skip "Signal detect seems broken on this system" + end + end + private # Run a shell Ruby command with command line options (using the |