Rake is too verbose, echos test command

喜夏-厌秋 提交于 2019-12-11 08:17:24

问题


Rake is too verbose:

$ bundle exec rake test:units
/Users/jared/.rvm/rubies/ruby-1.8.7-p370/bin/ruby -I"lib:test" -I"/Users/jared/.rvm/gems/ruby-1.8.7-p370@global/gems/rake-0.9.2.2/lib" "/Users/jared/.rvm/gems/ruby-1.8.7-p370@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/unit/**/*_test.rb" 
Loaded suite /Users/jared/.rvm/gems/ruby-1.8.7-p370@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
.....................................

This is what I want:

$ bundle exec rake test:units
.....................................

I still want to see test errors + failures, deprecation warnings, or arbitrary "stdout sentinels".

Is this possible? Thanks!


回答1:


You won't get this without modifying the rake task and/or the test library. Just grep out the undesired lines.

bundle exec rake test:units | grep -vP "^(Started|Loaded|\/)"


来源:https://stackoverflow.com/questions/12678536/rake-is-too-verbose-echos-test-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!