[spec] Update rake tasks (refs: #372)

Update the default task to clean fixtures, and don't run coverage report
(asked by @EmilienM).

New tasks:
  rake           => run all tests and clean fixtures (alias on :test)
  rake test      => run all tests and clean fixtures
  rake test_keep => run all tests and don't clean fixtures
  COV=y rake cov => run all tests, run coverage repo, and don't clean fixtures

Refs: #372
This commit is contained in:
Sebastien Badia
2014-03-21 10:29:42 +01:00
parent 409f2e9bab
commit d28a4026b7
3 changed files with 15 additions and 3 deletions

View File

@@ -106,7 +106,7 @@ Limitations
Getting Involved Getting Involved
---------------- ----------------
Need a feature? Found a bug? Let me know! Need a feature? Found a bug? Let us know!
We are extremely interested in growing a community of OpenStack experts and users around these modules so they can serve as an example of consolidated best practices of how to deploy openstack. We are extremely interested in growing a community of OpenStack experts and users around these modules so they can serve as an example of consolidated best practices of how to deploy openstack.

View File

@@ -17,7 +17,15 @@ PuppetSyntax.exclude_paths = exclude_paths
task(:default).clear task(:default).clear
task :default => [:spec_prep, :spec_standalone, :lint] task :default => :test
desc 'Run syntax, lint and spec tests' desc 'Run syntax, lint and spec tests'
task :test => [:syntax,:lint,:spec] task :test => [:syntax,:lint,:spec]
desc 'Run syntax, lint and spec tests (without fixture purge = train/airplane)'
task :test_keep => [:syntax,:lint,:spec_prep,:spec_standalone]
if ENV['COV']
desc 'Run syntax, lint, spec tests and coverage'
task :cov => [:syntax,:lint,:spec_prep,:spec_standalone]
end

View File

@@ -1 +1,5 @@
at_exit { RSpec::Puppet::Coverage.report! } require 'spec_helper'
if ENV['COV']
at_exit { RSpec::Puppet::Coverage.report! }
end