test-bot: remove email support.
This commit is contained in:
parent
0873eb6df2
commit
11a421948d
@ -9,7 +9,6 @@
|
|||||||
# --skip-setup: Don't check the local system is setup correctly.
|
# --skip-setup: Don't check the local system is setup correctly.
|
||||||
# --skip-homebrew: Don't check Homebrew's files and tests are all valid.
|
# --skip-homebrew: Don't check Homebrew's files and tests are all valid.
|
||||||
# --junit: Generate a JUnit XML test results file.
|
# --junit: Generate a JUnit XML test results file.
|
||||||
# --email: Generate an email subject file.
|
|
||||||
# --keep-old: Run brew bottle --keep-old to build new bottles for a single platform.
|
# --keep-old: Run brew bottle --keep-old to build new bottles for a single platform.
|
||||||
# --HEAD: Run brew install with --HEAD
|
# --HEAD: Run brew install with --HEAD
|
||||||
# --local: Ask Homebrew to write verbose logs under ./logs/ and set HOME to ./home/
|
# --local: Ask Homebrew to write verbose logs under ./logs/ and set HOME to ./home/
|
||||||
@ -34,7 +33,6 @@ require "rexml/cdata"
|
|||||||
require "cmd/tap"
|
require "cmd/tap"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
EMAIL_SUBJECT_FILE = "brew-test-bot.#{MacOS.cat}.email.txt"
|
|
||||||
BYTES_IN_1_MEGABYTE = 1024*1024
|
BYTES_IN_1_MEGABYTE = 1024*1024
|
||||||
|
|
||||||
def resolve_test_tap
|
def resolve_test_tap
|
||||||
@ -366,14 +364,6 @@ module Homebrew
|
|||||||
raise "Cannot set @name: invalid command-line arguments!"
|
raise "Cannot set @name: invalid command-line arguments!"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV["TRAVIS"]
|
|
||||||
puts "name: #{@name}"
|
|
||||||
puts "url: #{@url}"
|
|
||||||
puts "hash: #{@hash}"
|
|
||||||
puts "diff_start_sha1: #{diff_start_sha1}"
|
|
||||||
puts "diff_end_sha1: #{diff_end_sha1}"
|
|
||||||
end
|
|
||||||
|
|
||||||
@log_root = @brewbot_root + @name
|
@log_root = @brewbot_root + @name
|
||||||
FileUtils.mkdir_p @log_root
|
FileUtils.mkdir_p @log_root
|
||||||
|
|
||||||
@ -894,7 +884,7 @@ module Homebrew
|
|||||||
ARGV << "--junit" << "--local"
|
ARGV << "--junit" << "--local"
|
||||||
end
|
end
|
||||||
if ARGV.include? "--ci-master"
|
if ARGV.include? "--ci-master"
|
||||||
ARGV << "--email" << "--fast"
|
ARGV << "--fast"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.include? "--local"
|
if ARGV.include? "--local"
|
||||||
@ -902,14 +892,6 @@ module Homebrew
|
|||||||
mkdir_p ENV["HOME"]
|
mkdir_p ENV["HOME"]
|
||||||
ENV["HOMEBREW_LOGS"] = "#{Dir.pwd}/logs"
|
ENV["HOMEBREW_LOGS"] = "#{Dir.pwd}/logs"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.include? "--email"
|
|
||||||
File.open EMAIL_SUBJECT_FILE, "w" do |file|
|
|
||||||
# The file should be written at the end but in case we don't get to that
|
|
||||||
# point ensure that we have something valid.
|
|
||||||
file.write "#{MacOS.version}: internal error."
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_bot
|
def test_bot
|
||||||
@ -997,26 +979,6 @@ module Homebrew
|
|||||||
xml_document.write(xml_file, pretty_print_indent)
|
xml_document.write(xml_file, pretty_print_indent)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.include? "--email"
|
|
||||||
failed_steps = []
|
|
||||||
tests.each do |test|
|
|
||||||
test.steps.each do |step|
|
|
||||||
next if step.passed?
|
|
||||||
failed_steps << step.command_short
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if failed_steps.empty?
|
|
||||||
email_subject = ""
|
|
||||||
else
|
|
||||||
email_subject = "#{MacOS.version}: #{failed_steps.join ", "}."
|
|
||||||
end
|
|
||||||
|
|
||||||
File.open EMAIL_SUBJECT_FILE, "w" do |file|
|
|
||||||
file.write email_subject
|
|
||||||
end
|
|
||||||
end
|
|
||||||
ensure
|
ensure
|
||||||
if ARGV.include? "--clean-cache"
|
if ARGV.include? "--clean-cache"
|
||||||
HOMEBREW_CACHE.children.each(&:rmtree)
|
HOMEBREW_CACHE.children.each(&:rmtree)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user