tests, cask-tests: serialize stdout on CI
This commit is contained in:
parent
651303f62d
commit
869fb02149
@ -1,7 +1,10 @@
|
|||||||
require "English"
|
require "English"
|
||||||
|
|
||||||
def run_tests(executable, files, args = [])
|
def run_tests(executable, files, args = [])
|
||||||
system "bundle", "exec", executable, "--", *args, "--", *files
|
opts = []
|
||||||
|
opts << "--serialize-stdout" if ENV["CI"]
|
||||||
|
|
||||||
|
system "bundle", "exec", executable, *opts, "--", *args, "--", *files
|
||||||
end
|
end
|
||||||
|
|
||||||
repo_root = Pathname(__FILE__).realpath.parent.parent
|
repo_root = Pathname(__FILE__).realpath.parent.parent
|
||||||
|
|||||||
@ -41,16 +41,24 @@ module Homebrew
|
|||||||
|
|
||||||
files = Dir["test/test_*.rb"]
|
files = Dir["test/test_*.rb"]
|
||||||
files -= Dir["test/test_os_mac_*.rb"] unless OS.mac?
|
files -= Dir["test/test_os_mac_*.rb"] unless OS.mac?
|
||||||
|
|
||||||
|
opts = []
|
||||||
|
opts << "--serialize-stdout" if ENV["CI"]
|
||||||
|
|
||||||
args = []
|
args = []
|
||||||
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"
|
ENV["HOMEBREW_TESTS_ONLY"] = "1"
|
||||||
test_name, test_method = ARGV.value("only").split("/", 2)
|
test_name, test_method = ARGV.value("only").split("/", 2)
|
||||||
files = ["test/test_#{test_name}.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", "--", *args, "--", *files
|
|
||||||
|
system "bundle", "exec", "parallel_test", *opts,
|
||||||
|
"--", *args, "--", *files
|
||||||
|
|
||||||
Homebrew.failed = !$?.success?
|
Homebrew.failed = !$?.success?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user