mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-01-07 14:33:08 -06:00
Facilitate profiling of tests (#1611)
Allow for optional installation of test profilers to help development identify slow areas needing additional work.
This commit is contained in:
parent
6f2674eec6
commit
0af8931c36
6
Gemfile
6
Gemfile
@ -45,3 +45,9 @@ end
|
||||
group :plugins do
|
||||
gemspec
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "test-prof", require: false
|
||||
gem "ruby-prof", ">= 0.17.0", require: false
|
||||
gem 'stackprof', '>= 0.2.9', require: false
|
||||
end
|
||||
|
@ -63,10 +63,19 @@ RSpec.configure do |config|
|
||||
|
||||
# don't run acceptance tests by default
|
||||
config.filter_run_excluding :acceptance => true
|
||||
end
|
||||
|
||||
config.expect_with :rspec do |c|
|
||||
c.max_formatted_output_length = 2000 if c.respond_to?("max_formatted_output_length=")
|
||||
begin
|
||||
require 'test-prof'
|
||||
|
||||
TestProf.configure do |config|
|
||||
# use unique filenames for reports (by simply appending current timestamp)
|
||||
config.timestamps = true
|
||||
|
||||
# color output
|
||||
config.color = true
|
||||
end
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
require 'vagrant-spec/unit'
|
||||
|
Loading…
Reference in New Issue
Block a user