From dberger at globe.gov Tue Aug 3 12:20:43 2010 From: dberger at globe.gov (Daniel Berger) Date: Tue, 03 Aug 2010 10:20:43 -0600 Subject: [test-unit-users-en:00033] Rake aborted? Message-ID: <4C5841DB.5040307@globe.gov> Hi, Ruby 1.8.7 test-unit 2.1.1 In some cases when tests fail I get a "Rake aborted" message. Below is an example controller test from a Rails app, but I see it sometimes with my personal libraries. Started F... 1) Failure: test_a_valid_userid_and_password_can_signin(AdminControllerTest) [test/functional/admin_controller_test.rb:30]: Expected response to be a <:redirect>, but was <200> Finished in 0.168372 seconds. 4 tests, 6 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 0% passed rake aborted! Command failed with status (1): [/usr/local/bin/ruby -Itest test/functional...] /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `ruby' /home/dberger/Repositories/globe_village/lib/tasks/test.rake:65 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19 Any ideas? Regards, Dan From kou at cozmixng.org Wed Aug 4 07:43:50 2010 From: kou at cozmixng.org (Kouhei Sutou) Date: Wed, 04 Aug 2010 20:43:50 +0900 (JST) Subject: [test-unit-users-en:00034] Re: Rake aborted? In-Reply-To: <4C5841DB.5040307@globe.gov> References: <4C5841DB.5040307@globe.gov> Message-ID: <20100804.204350.1115548209165878967.kou@cozmixng.org> Hi, In <4C5841DB.5040307 at globe.gov> "[test-unit-users-en:00033] Rake aborted?" on Tue, 03 Aug 2010 10:20:43 -0600, Daniel Berger wrote: > In some cases when tests fail I get a "Rake aborted" > message. Below is an example controller test from a Rails > app, but I see it sometimes with my personal libraries. test-unit (and RSpec) exits with non-zero status code when one of tests (specs) are failed. Rake is aborted when executed command isn't finished with zero status code. > Any ideas? You can suppress backtrace of Rake by removing "--trace" Rake option. Is it not enough? Thanks, -- kou