aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-12-23 00:34:19 +0100
committerBaptiste Fontaine2015-12-23 12:33:32 +0100
commit86bd9c9f39fbe4aa88791f3973d41b26ac37e036 (patch)
tree5bf0c54f3ac4d6e364a088e9ef86043f5f01a831 /Library
parent755ca5da6cbd9530ebd43d61cd1333a3414951bd (diff)
downloadbrew-86bd9c9f39fbe4aa88791f3973d41b26ac37e036.tar.bz2
tests: pass --trace and named args to rake
Closes Homebrew/homebrew#47279. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/tests.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/tests.rb b/Library/Homebrew/cmd/tests.rb
index ed578a61d..38f087533 100644
--- a/Library/Homebrew/cmd/tests.rb
+++ b/Library/Homebrew/cmd/tests.rb
@@ -4,11 +4,19 @@ module Homebrew
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.include? "--coverage"
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
+
Homebrew.install_gem_setup_path! "bundler"
- quiet_system("bundle", "check") || \
- system("bundle", "install", "--path", "vendor/bundle")
- system "bundle", "exec", "rake", "test"
+ unless quiet_system("bundle", "check")
+ system "bundle", "install", "--path", "vendor/bundle"
+ end
+
+ args = []
+ args << "--trace" if ARGV.include? "--trace"
+ args += ARGV.named
+ system "bundle", "exec", "rake", "test", *args
+
Homebrew.failed = !$?.success?
+
if (fs_leak_log = HOMEBREW_LIBRARY/"Homebrew/test/fs_leak_log").file?
fs_leak_log_content = fs_leak_log.read
unless fs_leak_log_content.empty?