integration tests: only pass -f when a specific rsconsfile is specified

This commit is contained in:
Josh Holtrop 2017-05-23 15:55:28 -04:00
parent 599d10b50f
commit c9946da193

View File

@ -55,9 +55,14 @@ describe Rscons do
end
def run_test(options = {})
rsconsfile = options[:rsconsfile] || "Rsconsfile"
rsconsfile_args =
if options[:rsconsfile]
%W[-f #{options[:rsconsfile]}]
else
[]
end
rscons_args = options[:rscons_args] || []
command = %W[ruby -I. -r _simplecov_setup #{@owd}/bin/rscons -f #{rsconsfile}] + rscons_args
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]}"