tests: pass --trace and named args to rake

Closes Homebrew/homebrew#47279.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Baptiste Fontaine 2015-12-23 00:34:19 +01:00
parent 755ca5da6c
commit 86bd9c9f39

View File

@ -4,11 +4,19 @@ module Homebrew
ENV["TESTOPTS"] = "-v" if ARGV.verbose? ENV["TESTOPTS"] = "-v" if ARGV.verbose?
ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.include? "--coverage" ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.include? "--coverage"
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat" ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
Homebrew.install_gem_setup_path! "bundler" Homebrew.install_gem_setup_path! "bundler"
quiet_system("bundle", "check") || \ unless quiet_system("bundle", "check")
system("bundle", "install", "--path", "vendor/bundle") system "bundle", "install", "--path", "vendor/bundle"
system "bundle", "exec", "rake", "test" end
args = []
args << "--trace" if ARGV.include? "--trace"
args += ARGV.named
system "bundle", "exec", "rake", "test", *args
Homebrew.failed = !$?.success? Homebrew.failed = !$?.success?
if (fs_leak_log = HOMEBREW_LIBRARY/"Homebrew/test/fs_leak_log").file? if (fs_leak_log = HOMEBREW_LIBRARY/"Homebrew/test/fs_leak_log").file?
fs_leak_log_content = fs_leak_log.read fs_leak_log_content = fs_leak_log.read
unless fs_leak_log_content.empty? unless fs_leak_log_content.empty?