aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions
diff options
context:
space:
mode:
authorMike McQuaid2014-04-15 08:29:30 +0100
committerMike McQuaid2014-04-15 08:29:30 +0100
commit5883f1675d71c09a722343ef3f71280c246bc1bb (patch)
tree74bcc7c6dd28d81394bde0e389bbe306cf06efa7 /Library/Contributions
parent47d24c461c3ec6db5c75f2ccdefb2f8ad9998119 (diff)
downloadbrew-5883f1675d71c09a722343ef3f71280c246bc1bb.tar.bz2
brew-test-bot: check CompilerSelectionError twice.
It may be that even installing a new compiler doesn't fix things so detect that case and skip the formula installation rather than erroring out.
Diffstat (limited to 'Library/Contributions')
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb18
1 files changed, 15 insertions, 3 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index 01af3f026..a39b096b1 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -245,6 +245,10 @@ class Test
end
end
+ def skip formula
+ puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula}#{Tty.reset}"
+ end
+
def setup
@category = __method__
return if ARGV.include? "--skip-setup"
@@ -264,15 +268,23 @@ class Test
requirements = formula_object.recursive_requirements
unsatisfied_requirements = requirements.reject {|r| r.satisfied? or r.default_formula?}
unless unsatisfied_requirements.empty?
- puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula}#{Tty.reset}"
+ skip formula
unsatisfied_requirements.each {|r| puts r.message}
return
end
+ installed_gcc = false
begin
CompilerSelector.new(formula_object).compiler
- rescue CompilerSelectionError
- test "brew install apple-gcc42"
+ rescue CompilerSelectionError => e
+ unless installed_gcc
+ test "brew install apple-gcc42"
+ installed_gcc = true
+ retry
+ end
+ skip formula
+ puts e.message
+ return
end
test "brew fetch --retry #{dependencies}" unless dependencies.empty?