aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/test-bot.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dev-cmd/test-bot.rb')
-rw-r--r--Library/Homebrew/dev-cmd/test-bot.rb29
1 files changed, 10 insertions, 19 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb
index e7f68d4e8..c1a4d99b7 100644
--- a/Library/Homebrew/dev-cmd/test-bot.rb
+++ b/Library/Homebrew/dev-cmd/test-bot.rb
@@ -185,8 +185,8 @@ module Homebrew
def puts_result
if ENV["TRAVIS"]
- travis_start_time = @start_time.to_i*1000000000
- travis_end_time = @end_time.to_i*1000000000
+ travis_start_time = @start_time.to_i * 1_000_000_000
+ travis_end_time = @end_time.to_i * 1_000_000_000
travis_duration = travis_end_time - travis_start_time
puts "#{Tty.white}==>#{Tty.green} PASSED#{Tty.reset}" if passed?
puts "travis_time:end:#{@travis_timer_id},start=#{travis_start_time},finish=#{travis_end_time},duration=#{travis_duration}"
@@ -563,11 +563,10 @@ module Homebrew
(installed & dependencies).each do |installed_dependency|
installed_dependency_formula = Formulary.factory(installed_dependency)
- if installed_dependency_formula.installed? &&
- !installed_dependency_formula.keg_only? &&
- !installed_dependency_formula.linked_keg.exist?
- test "brew", "link", installed_dependency
- end
+ next unless installed_dependency_formula.installed?
+ next if installed_dependency_formula.keg_only?
+ next if installed_dependency_formula.linked_keg.exist?
+ test "brew", "link", installed_dependency
end
dependencies -= installed
@@ -725,9 +724,7 @@ module Homebrew
coverage_args = []
if ARGV.include?("--coverage")
if ENV["JENKINS_HOME"]
- if OS.mac? && MacOS.version == :sierra
- coverage_args << "--coverage"
- end
+ coverage_args << "--coverage" if OS.mac? && MacOS.version == :sierra
else
coverage_args << "--coverage"
end
@@ -742,9 +739,7 @@ module Homebrew
test "brew", "cask-tests", *coverage_args
end
elsif @tap
- if @tap.name == "homebrew/core"
- test "brew", "style", @tap.name
- end
+ test "brew", "style", @tap.name if @tap.name == "homebrew/core"
test "brew", "readall", "--aliases", @tap.name
end
end
@@ -1055,9 +1050,7 @@ module Homebrew
ARGV << "--junit" << "--local" << "--test-default-formula"
end
- if ARGV.include? "--ci-master"
- ARGV << "--fast"
- end
+ ARGV << "--fast" if ARGV.include?("--ci-master")
if ARGV.include? "--local"
ENV["HOMEBREW_CACHE"] = "#{ENV["HOME"]}/Library/Caches/Homebrew"
@@ -1081,9 +1074,7 @@ module Homebrew
safe_system "brew", "tap", tap.name, "--full"
end
- if ARGV.include? "--ci-upload"
- return test_ci_upload(tap)
- end
+ return test_ci_upload(tap) if ARGV.include?("--ci-upload")
tests = []
any_errors = false