Update spec task to preserve simplecov coverage info for previous full spec runs when doing a partial spec run

This commit is contained in:
josh committed 2017-05-24 16:29:17 -04:00
1 parent 83226e894d
commit a11fab43cb
3 files changed
+13 -1

No files matched your search

+7 -1
View File
@@ -65,7 +65,13 @@ describe Rscons do
command = %W[ruby -I. -r _simplecov_setup #{@owd}/bin/rscons] + rsconsfile_args + rscons_args
@statics[:build_test_id] ||= 0
@statics[:build_test_id] += 1
command_name = "b#{@statics[:build_test_id]}"
command_prefix =
if ENV["partial_specs"]
"p"
else
"b"
end
command_name = "#{command_prefix}#{@statics[:build_test_id]}"
File.open("_simplecov_setup.rb", "w") do |fh|
fh.puts <<EOF
require "simplecov"
+5
View File
@@ -2,6 +2,11 @@ require "simplecov"
SimpleCov.start do
add_filter "/spec/"
if ENV["partial_specs"]
command_name "RSpec-partial"
else
command_name "RSpec"
end
project_name "Rscons"
merge_timeout 3600
end