allow for specifying a build pattern when executing parallel specs

Change-Id: Ia855d75d03f8c34b4e0968b519a8d66eaf184b92
Reviewed-on: https://gerrit.instructure.com/9569
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
This commit is contained in:
Bryan Madsen 2012-03-22 15:27:04 -06:00
parent e95ca1652e
commit a516c8d03f
1 changed files with 13 additions and 0 deletions

View File

@ -208,5 +208,18 @@ namespace :parallel do
test_files.map! { |f| "#{Rails.root}/#{f}" }
Rake::Task['parallel:spec'].invoke(count, '', '', test_files.join(' '))
end
task :pattern, :count, :file_pattern do |t, args|
require "parallel_tests"
count = args[:count]
file_pattern = args[:file_pattern]
if count.nil? || file_pattern.nil?
raise "Must specify a thread count and file pattern"
end
test_files = FileList[file_pattern]
test_files.map! { |f| "#{Rails.root}/#{f}" }
Rake::Task['parallel:spec'].invoke(count, '', '', test_files.join(' '))
end
end
end