Commit 1f93b07d647e22bb749ef5bd41daf06a5e885d77
1 parent
a724efac
Exists in
web_steps_improvements
and in
6 other branches
cucumber.yml: support slicing features
Showing
2 changed files
with
13 additions
and
6 deletions
Show diff stats
config/cucumber.yml
... | ... | @@ -3,10 +3,18 @@ |
3 | 3 | default_options = "--format progress --strict --tags ~@selenium --tags ~@selenium-fixme --tags ~@fixme --exclude features/support/selenium.rb #{base_requires}" |
4 | 4 | default_options << ' --color' if $stdout.isatty |
5 | 5 | selenium_options = "--strict --tags @selenium #{base_requires}" |
6 | + | |
7 | + core_features = Dir.glob "features/**/*.feature" | |
8 | + if slice = ENV['SLICE'] | |
9 | + sel,size = slice.split '/' | |
10 | + size = (core_features.size / size.to_f).ceil | |
11 | + core_features = core_features.each_slice(size).to_a[sel.to_i - 1] | |
12 | + end | |
13 | + core_features = core_features.join ' ' | |
6 | 14 | %> |
7 | 15 | |
8 | -default: <%= default_options %> | |
9 | -selenium: <%= selenium_options %> | |
16 | +default: <%= default_options %> <%= core_features %> | |
17 | +selenium: <%= selenium_options %> <%= core_features %> | |
10 | 18 | |
11 | 19 | <% |
12 | 20 | enabled_plugins = Dir.glob(File.join('config', 'plugins', '*')).map do |path| | ... | ... |
lib/tasks/plugins_tests.rake
... | ... | @@ -217,10 +217,9 @@ namespace :test do |
217 | 217 | task :noosfero_plugins do |
218 | 218 | plugins = @all_plugins - $broken_plugins |
219 | 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] | |
220 | + sel,size = slice.split '/' | |
221 | + size = (plugins.size / size.to_f).ceil | |
222 | + plugins = plugins.each_slice(size).to_a[sel.to_i - 1] | |
224 | 223 | end |
225 | 224 | |
226 | 225 | test_sequence plugins, @all_tasks do |failed| | ... | ... |