Reorder and rename test files.
This commit is contained in:
parent
edf042ee97
commit
6b6b27126d
@ -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?
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ require "helper/integration_command_test_case"
|
||||
|
||||
class IntegrationCommandTestCreate < IntegrationCommandTestCase
|
||||
def test_create
|
||||
url = "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz"
|
||||
url = "file://#{TEST_DIRECTORY}/tarballs/testball-0.1.tbz"
|
||||
cmd("create", url, "HOMEBREW_EDITOR" => "/bin/cat")
|
||||
|
||||
formula_file = CoreTap.new.formula_dir/"testball.rb"
|
||||
@ -18,7 +18,7 @@ class FormularyFactoryTest < Homebrew::TestCase
|
||||
def setup
|
||||
@name = "testball_bottle"
|
||||
@path = CoreTap.new.formula_dir/"#{@name}.rb"
|
||||
@bottle_dir = Pathname.new("#{File.expand_path("..", __FILE__)}/bottles")
|
||||
@bottle_dir = Pathname.new("#{TEST_DIRECTORY}/bottles")
|
||||
@bottle = @bottle_dir/"testball_bottle-0.1.#{Utils::Bottles.tag}.bottle.tar.gz"
|
||||
@path.write <<-EOS.undent
|
||||
class #{Formulary.class_s(@name)} < Formula
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user