rake 测试:单位失败,状态为 ()
新用户,我还没有构建测试,所以我是个白痴。
应用程序正在运行,但测试失败。以下是似乎相关的内容:
。
...
** Execute test:units
/usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/event_test.rb" "test/unit/helpers/calendar1_helper_test.rb" "test/unit/helpers/events_helper_test.rb" "test/unit/helpers/homepage_helper_test.rb" "test/unit/helpers/main_helper_test.rb" "test/unit/helpers/mobile_helper_test.rb" "test/unit/helpers/notes_helper_test.rb" "test/unit/helpers/password_resets_helper_test.rb" "test/unit/helpers/projects_helper_test.rb" "test/unit/helpers/search_helper_test.rb" "test/unit/helpers/start_helper_test.rb" "test/unit/helpers/superadmin_helper_test.rb" "test/unit/helpers/tasks_helper_test.rb" "test/unit/helpers/user_sessions_helper_test.rb" "test/unit/helpers/users_helper_test.rb" "test/unit/note_test.rb" "test/unit/notifier_test.rb" "test/unit/project_test.rb" "test/unit/task_test.rb" "test/unit/user_session_test.rb" "test/unit/user_test.rb"
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/usr/lib/ruby/gems/1.8/gems/hpricot-0.6.164/lib/universal-java1.6/fast_xs.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
rake aborted!
Command failed with status (): [/usr/local/bin/ruby -I"lib:test" "/usr/loc...]
/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'
New user, haven't been building tests as I go, so I'm an idiot.
The application is running, but the tests fail. Here is what appears to be relevant:
.
...
** Execute test:units
/usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/event_test.rb" "test/unit/helpers/calendar1_helper_test.rb" "test/unit/helpers/events_helper_test.rb" "test/unit/helpers/homepage_helper_test.rb" "test/unit/helpers/main_helper_test.rb" "test/unit/helpers/mobile_helper_test.rb" "test/unit/helpers/notes_helper_test.rb" "test/unit/helpers/password_resets_helper_test.rb" "test/unit/helpers/projects_helper_test.rb" "test/unit/helpers/search_helper_test.rb" "test/unit/helpers/start_helper_test.rb" "test/unit/helpers/superadmin_helper_test.rb" "test/unit/helpers/tasks_helper_test.rb" "test/unit/helpers/user_sessions_helper_test.rb" "test/unit/helpers/users_helper_test.rb" "test/unit/note_test.rb" "test/unit/notifier_test.rb" "test/unit/project_test.rb" "test/unit/task_test.rb" "test/unit/user_session_test.rb" "test/unit/user_test.rb"
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/usr/lib/ruby/gems/1.8/gems/hpricot-0.6.164/lib/universal-java1.6/fast_xs.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
rake aborted!
Command failed with status (): [/usr/local/bin/ruby -I"lib:test" "/usr/loc...]
/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'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Rake 未能报告运行测试的子进程已被信号终止这一事实。
请注意 () 之间缺少的退出代码。您可以通过运行“strace -o rake.strace rake”来发现信号,并在结果文件的末尾附近查找类似的内容,
在我的例子中,这是(现在大概是臭名昭著的)mysql 2.8.1 gem 因“virtual”而失败在 ruby-1.8.6 的较新补丁级别下运行时,计时器已过期”(-p399 已损坏,不确定哪些旧版本仍然有效)。
[哎呀,忘记修复了]
下一步...
Rake is failing to report the fact that its subprocess running your tests was killed with a signal.
Note the missing exit code between (). You can spot the signal by running "strace -o rake.strace rake" and look near the end of the resulting file for something like
In my case, this is the (presumably infamous by now) mysql 2.8.1 gem failing with "virtual timer expired" when running under the newer patchlevels of ruby-1.8.6 (-p399 is broken, not sure which older versions still work).
[oops, forgot the fixes]
Next steps...