aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/test.rb
diff options
context:
space:
mode:
authorMike McQuaid2012-04-30 14:08:59 +1000
committerMike McQuaid2012-04-30 21:38:08 +0800
commit34c970b103f2dc725a02577dabcb4999fd4a32a0 (patch)
tree3b828650de71fbdc87c843a7c2d37686b4cc11c4 /Library/Homebrew/cmd/test.rb
parentcd4f7c10cd97f8661b7b63b9348401416d86a6ab (diff)
downloadhomebrew-34c970b103f2dc725a02577dabcb4999fd4a32a0.tar.bz2
Add ofail command and fix bottle command output.
Diffstat (limited to 'Library/Homebrew/cmd/test.rb')
-rw-r--r--Library/Homebrew/cmd/test.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/test.rb b/Library/Homebrew/cmd/test.rb
index 9415ba21a..fc3b43229 100644
--- a/Library/Homebrew/cmd/test.rb
+++ b/Library/Homebrew/cmd/test.rb
@@ -12,15 +12,13 @@ module Homebrew extend self
ARGV.formulae.each do |f|
# Cannot test uninstalled formulae
unless f.installed?
- puts "Testing requires the latest version of #{f.name}"
- Homebrew.failed = true
+ ofail "Testing requires the latest version of #{f.name}"
next
end
# Cannot test formulae without a test method
unless f.respond_to? :test
- puts "#{f.name} defines no test"
- Homebrew.failed = true
+ ofail "#{f.name} defines no test"
next
end
@@ -29,8 +27,7 @@ module Homebrew extend self
# tests can also return false to indicate failure
raise if f.test == false
rescue
- puts "#{f.name}: failed"
- Homebrew.failed = true
+ ofail "#{f.name}: failed"
end
end
end