Reorder and rename test files.
This commit is contained in:
parent
edf042ee97
commit
6b6b27126d
@ -8,7 +8,7 @@ module Homebrew
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def tests
|
def tests
|
||||||
(HOMEBREW_LIBRARY/"Homebrew").cd do
|
HOMEBREW_LIBRARY_PATH.cd do
|
||||||
ENV.delete "HOMEBREW_VERBOSE"
|
ENV.delete "HOMEBREW_VERBOSE"
|
||||||
ENV.delete "VERBOSE"
|
ENV.delete "VERBOSE"
|
||||||
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
|
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
|
||||||
@ -44,8 +44,8 @@ module Homebrew
|
|||||||
# Make it easier to reproduce test runs.
|
# Make it easier to reproduce test runs.
|
||||||
ENV["SEED"] = ARGV.next if ARGV.include? "--seed"
|
ENV["SEED"] = ARGV.next if ARGV.include? "--seed"
|
||||||
|
|
||||||
files = Dir["test/test_*.rb"]
|
files = Dir.glob("test/test/**/*_test.rb")
|
||||||
files -= Dir["test/test_os_mac_*.rb"] unless OS.mac?
|
.reject { |p| !OS.mac? && p.start_with?("test/test/os/mac/") }
|
||||||
|
|
||||||
opts = []
|
opts = []
|
||||||
opts << "--serialize-stdout" if ENV["CI"]
|
opts << "--serialize-stdout" if ENV["CI"]
|
||||||
@ -54,16 +54,14 @@ module Homebrew
|
|||||||
args << "--trace" if ARGV.include? "--trace"
|
args << "--trace" if ARGV.include? "--trace"
|
||||||
|
|
||||||
if ARGV.value("only")
|
if ARGV.value("only")
|
||||||
ENV["HOMEBREW_TESTS_ONLY"] = "1"
|
test_name, test_method = ARGV.value("only").split(":", 2)
|
||||||
test_name, test_method = ARGV.value("only").split("/", 2)
|
files = Dir.glob("test/test/{#{test_name},#{test_name}/**/*}_test.rb")
|
||||||
files = ["test/test_#{test_name}.rb"]
|
|
||||||
args << "--name=test_#{test_method}" if test_method
|
args << "--name=test_#{test_method}" if test_method
|
||||||
end
|
end
|
||||||
|
|
||||||
args += ARGV.named.select { |v| v[/^TEST(OPTS)?=/] }
|
args += ARGV.named.select { |v| v[/^TEST(OPTS)?=/] }
|
||||||
|
|
||||||
system "bundle", "exec", "parallel_test", *opts,
|
system "bundle", "exec", "parallel_test", *opts, "--", *args, "--", *files
|
||||||
"--", *args, "--", *files
|
|
||||||
|
|
||||||
Homebrew.failed = !$?.success?
|
Homebrew.failed = !$?.success?
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ require "helper/integration_command_test_case"
|
|||||||
|
|
||||||
class IntegrationCommandTestCreate < IntegrationCommandTestCase
|
class IntegrationCommandTestCreate < IntegrationCommandTestCase
|
||||||
def test_create
|
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")
|
cmd("create", url, "HOMEBREW_EDITOR" => "/bin/cat")
|
||||||
|
|
||||||
formula_file = CoreTap.new.formula_dir/"testball.rb"
|
formula_file = CoreTap.new.formula_dir/"testball.rb"
|
||||||
@ -18,7 +18,7 @@ class FormularyFactoryTest < Homebrew::TestCase
|
|||||||
def setup
|
def setup
|
||||||
@name = "testball_bottle"
|
@name = "testball_bottle"
|
||||||
@path = CoreTap.new.formula_dir/"#{@name}.rb"
|
@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"
|
@bottle = @bottle_dir/"testball_bottle-0.1.#{Utils::Bottles.tag}.bottle.tar.gz"
|
||||||
@path.write <<-EOS.undent
|
@path.write <<-EOS.undent
|
||||||
class #{Formulary.class_s(@name)} < Formula
|
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