aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/tests.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dev-cmd/tests.rb')
-rw-r--r--Library/Homebrew/dev-cmd/tests.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb
index ee7fa9275..df9a00a16 100644
--- a/Library/Homebrew/dev-cmd/tests.rb
+++ b/Library/Homebrew/dev-cmd/tests.rb
@@ -8,7 +8,7 @@ module Homebrew
module_function
def tests
- (HOMEBREW_LIBRARY/"Homebrew").cd do
+ HOMEBREW_LIBRARY_PATH.cd do
ENV.delete "HOMEBREW_VERBOSE"
ENV.delete "VERBOSE"
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
@@ -44,8 +44,8 @@ module Homebrew
# Make it easier to reproduce test runs.
ENV["SEED"] = ARGV.next if ARGV.include? "--seed"
- files = Dir["test/test_*.rb"]
- files -= Dir["test/test_os_mac_*.rb"] unless OS.mac?
+ files = Dir.glob("test/test/**/*_test.rb")
+ .reject { |p| !OS.mac? && p.start_with?("test/test/os/mac/") }
opts = []
opts << "--serialize-stdout" if ENV["CI"]
@@ -54,16 +54,14 @@ module Homebrew
args << "--trace" if ARGV.include? "--trace"
if ARGV.value("only")
- ENV["HOMEBREW_TESTS_ONLY"] = "1"
- test_name, test_method = ARGV.value("only").split("/", 2)
- files = ["test/test_#{test_name}.rb"]
+ test_name, test_method = ARGV.value("only").split(":", 2)
+ files = Dir.glob("test/test/{#{test_name},#{test_name}/**/*}_test.rb")
args << "--name=test_#{test_method}" if test_method
end
args += ARGV.named.select { |v| v[/^TEST(OPTS)?=/] }
- system "bundle", "exec", "parallel_test", *opts,
- "--", *args, "--", *files
+ system "bundle", "exec", "parallel_test", *opts, "--", *args, "--", *files
Homebrew.failed = !$?.success?