Skip to content
Snippets Groups Projects
Commit 869fb021 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

tests, cask-tests: serialize stdout on CI

parent 651303f6
No related branches found
No related tags found
No related merge requests found
require "English"
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
repo_root = Pathname(__FILE__).realpath.parent.parent
......
......@@ -41,16 +41,24 @@ module Homebrew
files = Dir["test/test_*.rb"]
files -= Dir["test/test_os_mac_*.rb"] unless OS.mac?
opts = []
opts << "--serialize-stdout" if ENV["CI"]
args = []
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"]
args << "--name=test_#{test_method}" if test_method
end
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?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment