Commit 1bed10f7381aece53166e4bdbbf653a1a67ebd18
1 parent
1c48df3a
Exists in
web_steps_improvements
and in
8 other branches
plugins_tests: Add environment to slice tests
Showing
1 changed file
with
9 additions
and
1 deletions
Show diff stats
lib/tasks/plugins_tests.rake
... | ... | @@ -215,7 +215,15 @@ namespace :test do |
215 | 215 | |
216 | 216 | desc "Run all tests for all plugins" |
217 | 217 | task :noosfero_plugins do |
218 | - test_sequence(@all_plugins - $broken_plugins, @all_tasks) do |failed| | |
218 | + plugins = @all_plugins - $broken_plugins | |
219 | + if slice = ENV['SLICE'] | |
220 | + slice = slice.split('/').map &:to_i | |
221 | + selected = slice[0]-1 | |
222 | + size = (plugins.size / slice[1].to_f).ceil | |
223 | + plugins = plugins.each_slice(size).to_a[selected] | |
224 | + end | |
225 | + | |
226 | + test_sequence plugins, @all_tasks do |failed| | |
219 | 227 | plugins_status_report(failed) |
220 | 228 | end |
221 | 229 | end | ... | ... |