rake 测试:单位失败,状态为 ()

发布于 2024-08-29 11:29:01 字数 1633 浏览 3 评论 0原文

新用户,我还没有构建测试,所以我是个白痴。

应用程序正在运行,但测试失败。以下是似乎相关的内容:

...

** 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等数载,海棠开 2024-09-05 11:29:01

Rake 未能报告运行测试的子进程已被信号终止这一事实。

rake aborted! Command failed with status ():

请注意 () 之间缺少的退出代码。您可以通过运行“strace -o rake.strace rake”来发现信号,并在结果文件的末尾附近查找类似的内容,

[{WIFSIGNALED(s) && WTERMSIG(s) == SIGVTALRM}], 0, NULL)

在我的例子中,这是(现在大概是臭名昭著的)mysql 2.8.1 gem 因“virtual”而失败在 ruby​​-1.8.6 的较新补丁级别下运行时,计时器已过期”(-p399 已损坏,不确定哪些旧版本仍然有效)。

[哎呀,忘记修复了]

下一步...

  • 在 rake 之外或在 strace 下运行进程,找出信号是什么,
  • 假设这是 mysql 2.8.1 / Ruby 1.8.6-p399 问题并降级到 mysql '~ >2.7.0' 或 Ruby 1.8.6 的某个早期补丁级别,或升级到 Ruby 1.8.7

Rake is failing to report the fact that its subprocess running your tests was killed with a signal.

rake aborted! Command failed with status ():

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

[{WIFSIGNALED(s) && WTERMSIG(s) == SIGVTALRM}], 0, NULL)

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...

  • run the process outside rake, or under strace, to find out what the signal is
  • assume it's the mysql 2.8.1 / Ruby 1.8.6-p399 problem and downgrade to mysql '~>2.7.0' or some earlier patchlevel of Ruby 1.8.6, or upgrade to Ruby 1.8.7
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文