aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-20 13:16:11 +0100
committerAlyssa Ross2016-09-20 13:16:11 +0100
commit1c4ae988232050ac22785fe062f3c912ed70cdfc (patch)
tree1af24d62e2357932db16bb2d56ab3ea7bc780abf /Library
parent176c82516f4d81d29d8354e99273afc8cd889338 (diff)
downloadbrew-1c4ae988232050ac22785fe062f3c912ed70cdfc.tar.bz2
tests, cask-tests: log test runtimes
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/cask/cmd/brew-cask-tests.rb13
-rw-r--r--Library/Homebrew/cask/test/test_helper.rb2
-rw-r--r--Library/Homebrew/test/testing_env.rb1
3 files changed, 14 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/cmd/brew-cask-tests.rb b/Library/Homebrew/cask/cmd/brew-cask-tests.rb
index 20f343047..283b8516a 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 e4fd72170..bf557f66b 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 396d92e13..676badf82 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"