tests: rm the coverage cache before each run
Closes Homebrew/homebrew#48209. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
parent
89c63279d4
commit
44a264376b
@ -1,9 +1,14 @@
|
|||||||
|
require "fileutils"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
def tests
|
def tests
|
||||||
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
|
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
|
||||||
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
|
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"
|
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
|
# Override author/committer as global settings might be invalid and thus
|
||||||
# will cause silent failure during the setup of dummy Git repositories.
|
# will cause silent failure during the setup of dummy Git repositories.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user