mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -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
|
group :plugins do
|
||||||
gemspec
|
gemspec
|
||||||
end
|
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
|
# don't run acceptance tests by default
|
||||||
config.filter_run_excluding :acceptance => true
|
config.filter_run_excluding :acceptance => true
|
||||||
|
end
|
||||||
|
|
||||||
config.expect_with :rspec do |c|
|
begin
|
||||||
c.max_formatted_output_length = 2000 if c.respond_to?("max_formatted_output_length=")
|
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
|
end
|
||||||
|
rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'vagrant-spec/unit'
|
require 'vagrant-spec/unit'
|
||||||
|
Loading…
Reference in New Issue
Block a user