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:
parent
e95ca1652e
commit
a516c8d03f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue