aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBaptiste Fontaine2016-01-18 15:33:59 +0100
committerBaptiste Fontaine2016-01-19 00:28:41 +0100
commit44a264376bd802bb6fec2117e8feb0e076871297 (patch)
treea0ccedbd08ebdd7d7beea124921ba4810ee0fb99 /Library
parent89c63279d43e3103ded9c0cd4c2fcb271435ca5f (diff)
downloadbrew-44a264376bd802bb6fec2117e8feb0e076871297.tar.bz2
tests: rm the coverage cache before each run
Closes Homebrew/homebrew#48209. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/tests.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/tests.rb b/Library/Homebrew/cmd/tests.rb
index c5af2a72f..a796e2f38 100644
--- a/Library/Homebrew/cmd/tests.rb
+++ b/Library/Homebrew/cmd/tests.rb
@@ -1,9 +1,14 @@
+require "fileutils"
+
module Homebrew
def tests
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
- ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.include? "--coverage"
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
+ if ARGV.include? "--coverage"
+ ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
+ FileUtils.rm_f "coverage/.resultset.json"
+ end
# Override author/committer as global settings might be invalid and thus
# will cause silent failure during the setup of dummy Git repositories.