[rakefile] Add code coverage and enable syntax checks (refs: #372)
This commit is contained in:
11
Rakefile
11
Rakefile
@@ -1,5 +1,6 @@
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
require 'puppet-syntax/tasks/puppet-syntax'
|
||||
|
||||
PuppetLint.configuration.fail_on_warnings = true
|
||||
PuppetLint.configuration.send('disable_80chars')
|
||||
@@ -8,7 +9,15 @@ PuppetLint.configuration.send('disable_class_parameter_defaults')
|
||||
# For stonith-enabled (it's a string not a bool)
|
||||
PuppetLint.configuration.send('disable_quoted_booleans')
|
||||
# Ignore all upstream modules
|
||||
PuppetLint.configuration.ignore_paths = ['spec/fixtures/modules/**/*.pp','examples/*.pp']
|
||||
exclude_paths = ['spec/**/*','pkg/**/*','vendor/**/*']
|
||||
exclude_lint_paths = exclude_paths + ['examples/*.pp']
|
||||
|
||||
PuppetLint.configuration.ignore_paths = exclude_lint_paths
|
||||
PuppetSyntax.exclude_paths = exclude_paths
|
||||
|
||||
|
||||
task(:default).clear
|
||||
task :default => [:spec_prep, :spec_standalone, :lint]
|
||||
|
||||
desc 'Run syntax, lint and spec tests'
|
||||
task :test => [:syntax,:lint,:spec]
|
||||
|
1
spec/classes/coverage_spec.rb
Normal file
1
spec/classes/coverage_spec.rb
Normal file
@@ -0,0 +1 @@
|
||||
at_exit { RSpec::Puppet::Coverage.report! }
|
Reference in New Issue
Block a user