diff options
| author | Markus Reiter | 2016-10-21 08:57:39 +0200 | 
|---|---|---|
| committer | Markus Reiter | 2016-11-16 23:52:37 +0100 | 
| commit | 6b6b27126d7ecc1dde9a6bc166a7e1daa3af35d2 (patch) | |
| tree | 60fcf247ce650e96a0d8f5588cd1a8d79d57aeb8 /Library/Homebrew/dev-cmd | |
| parent | edf042ee97f80955b077724119e717a51eb25e29 (diff) | |
| download | brew-6b6b27126d7ecc1dde9a6bc166a7e1daa3af35d2.tar.bz2 | |
Reorder and rename test files.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/tests.rb | 14 | 
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?  | 
