Permalink
Browse files

Skip exit code test in Ruby 1.8.

We are unable to accurately determine the exit status using popen3 in
Ruby 1.8.7, so we are skipping the exit status test.
  • Loading branch information...
1 parent fc8c5b6 commit a5242af6d9868be60a166b7e084a10a38e49fc33 @jimweirich committed Dec 4, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 test/test_rake_functional.rb
@@ -438,6 +438,14 @@ def test_signal_propagation_in_tests
end
def test_failing_test_sets_exit_status
+ # Skipping this test in Ruby 1.8.7.
+ #
+ # We are unable to accurately verify that Rake returns an error
+ # exit status using popen3 in Ruby 1.8.7. Hand checking seems to
+ # indicate that Rake should pass this test, but we don't seem to
+ # be able to get the error status in correctly.
+ skip if RUBY_VERSION < "1.9"
+
rakefile_failing_test_task
rake
assert_equal 1, @exit.exitstatus
@@ -474,9 +482,9 @@ def run_ruby(option_list)
inn, out, err, wait = Open3.popen3(Gem.ruby, *option_list)
inn.close
+ @exit = wait ? wait.value : $?
@out = out.read
@err = err.read
- @exit = wait.value
puts "OUTPUT: [#{@out}]" if @verbose
puts "ERROR: [#{@err}]" if @verbose

0 comments on commit a5242af

Please sign in to comment.