diff --git a/.gitignore b/.gitignore index 4b42e327d1..54caa8def3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,11 +13,13 @@ /Library/Homebrew/cask/bin /Library/Homebrew/cask/vendor /Library/Homebrew/cask/coverage +/Library/Homebrew/cask/tmp /Library/Homebrew/test/.bundle /Library/Homebrew/test/bin /Library/Homebrew/test/vendor /Library/Homebrew/test/coverage /Library/Homebrew/test/fs_leak_log +/Library/Homebrew/tmp /Library/LinkedKegs /Library/Locks /Library/PinnedKegs diff --git a/Library/Homebrew/cask/cmd/brew-cask-tests.rb b/Library/Homebrew/cask/cmd/brew-cask-tests.rb index 20f3430473..283b8516a9 100755 --- a/Library/Homebrew/cask/cmd/brew-cask-tests.rb +++ b/Library/Homebrew/cask/cmd/brew-cask-tests.rb @@ -19,8 +19,17 @@ repo_root.cd do ENV["TESTOPTS"] = "--seed=14830" if ENV["TRAVIS"] ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.flag?("--coverage") - run_tests "parallel_rspec", Dir["spec/**/*_spec.rb"] if rspec - run_tests "parallel_test", Dir["test/**/*_test.rb"] if minitest + if rspec + run_tests "parallel_rspec", Dir["spec/**/*_spec.rb"], %w[ + --format progress + --format ParallelTests::RSpec::RuntimeLogger + --out tmp/parallel_runtime_rspec.log + ] + end + + if minitest + run_tests "parallel_test", Dir["test/**/*_test.rb"] + end if ENV["CODECOV_TOKEN"] require "simplecov" diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb index e4fd721703..bf557f66bc 100644 --- a/Library/Homebrew/cask/test/test_helper.rb +++ b/Library/Homebrew/cask/test/test_helper.rb @@ -39,6 +39,8 @@ require "minitest/autorun" require "minitest/reporters" Minitest::Reporters.use! Minitest::Reporters::DefaultReporter.new(color: true) +require "parallel_tests/test/runtime_logger" + # Force mocha to patch MiniTest since we have both loaded thanks to homebrew's testing_env require "mocha/api" require "mocha/integration/mini_test" diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb index 396d92e13f..676badf82d 100644 --- a/Library/Homebrew/test/testing_env.rb +++ b/Library/Homebrew/test/testing_env.rb @@ -15,6 +15,7 @@ TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__)) begin require "rubygems" require "minitest/autorun" + require "parallel_tests/test/runtime_logger" require "mocha/setup" rescue LoadError abort "Run `bundle install` or install the mocha and minitest gems before running the tests"