diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-05 18:26:12 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-05 18:26:12 +0000 |
| commit | d0ecc0e45cc5ff0cd5235e6ab9bcd031030973c2 (patch) | |
| tree | d1c442139297a2afe4040cb953de406cb6bec01e /test/Rakefile | |
| parent | 2728f500c62118a19b5f93640747cbfdbd97a9bd (diff) | |
| download | puppet-d0ecc0e45cc5ff0cd5235e6ab9bcd031030973c2.tar.gz puppet-d0ecc0e45cc5ff0cd5235e6ab9bcd031030973c2.tar.xz puppet-d0ecc0e45cc5ff0cd5235e6ab9bcd031030973c2.zip | |
Messing around a bit with how tests work
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2054 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/Rakefile')
| -rw-r--r-- | test/Rakefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/Rakefile b/test/Rakefile index 1f9bfa203..4e4512d0b 100644 --- a/test/Rakefile +++ b/test/Rakefile @@ -4,6 +4,7 @@ rescue LoadError $stderr.puts "You must have 'rake' installed to use this file" exit(1) end + require 'find' include Find @@ -12,6 +13,10 @@ include FileTest $exclusions = %W(lib data) $test_library_paths = %W(lib ../lib) +$: << File.join(Dir.getwd, "lib") + +require 'rake/puppet_testtask' + filemap = Hash.new { |hash, key| hash[key] = [] } allfiles = [] @@ -48,7 +53,7 @@ find(".") do |f| end desc "Run the full test suite" -Rake::TestTask.new :test do |t| +Rake::PuppetTestTask.new :test do |t| t.libs << $test_library_paths # Add every file as a test file to run @@ -65,7 +70,7 @@ filemap.each do |dir, files| # First create a separate task for each file in the namespace. namespace ns do files.each do |file| - Rake::TestTask.new File.basename(file, '.rb').to_sym do |t| + Rake::PuppetTestTask.new File.basename(file, '.rb').to_sym do |t| t.libs << $test_library_paths + ['..'] t.test_files = [ file ] t.verbose = true @@ -74,7 +79,7 @@ filemap.each do |dir, files| end # Then create a task that matches the directory itself. - Rake::TestTask.new dir do |t| + Rake::PuppetTestTask.new dir do |t| t.libs << $test_library_paths if ENV["TESTFILES"] t.test_files = ENV["TESTFILES"].split(/\s+/) |
