Commit bf2cbbd3dc1867b9aecf86a721f19701191c9909
1 parent
aece445a
Exists in
master
and in
20 other branches
Fix behaviour of `rake`
For some bizarre reason no tests would run when the :cucumber task is added as a dependency of :default (??). Also let's stop messing with the dependencies of the test task; the task to run all tests (as in ci.noosfero.org) is now ci:full
Showing
2 changed files
with
1 additions
and
11 deletions
Show diff stats
lib/tasks/cucumber.rake
| @@ -44,8 +44,6 @@ begin | @@ -44,8 +44,6 @@ begin | ||
| 44 | desc 'Alias for cucumber:ok' | 44 | desc 'Alias for cucumber:ok' |
| 45 | task :cucumber => 'cucumber:ok' | 45 | task :cucumber => 'cucumber:ok' |
| 46 | 46 | ||
| 47 | - task :default => :cucumber | ||
| 48 | - | ||
| 49 | task :features => :cucumber do | 47 | task :features => :cucumber do |
| 50 | STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***" | 48 | STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***" |
| 51 | end | 49 | end |
lib/tasks/test.rake
| 1 | -t = Rake::Task[:test] | ||
| 2 | -if t.respond_to?(:clear) | ||
| 3 | - t.clear | ||
| 4 | -else | ||
| 5 | - t.prerequisites.clear | ||
| 6 | - t.instance_variable_get('@actions').clear | ||
| 7 | -end | ||
| 8 | - | ||
| 9 | desc 'Runs Seleniun acceptance tests' | 1 | desc 'Runs Seleniun acceptance tests' |
| 10 | task :selenium do | 2 | task :selenium do |
| 11 | sh "xvfb-run -a cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}" | 3 | sh "xvfb-run -a cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}" |
| @@ -16,7 +8,7 @@ CucumberTasks = %w(cucumber selenium) | @@ -16,7 +8,7 @@ CucumberTasks = %w(cucumber selenium) | ||
| 16 | NoosferoTasks = %w(test:noosfero_plugins) | 8 | NoosferoTasks = %w(test:noosfero_plugins) |
| 17 | AllTasks = TestTasks + CucumberTasks + NoosferoTasks | 9 | AllTasks = TestTasks + CucumberTasks + NoosferoTasks |
| 18 | 10 | ||
| 19 | -task :test do | 11 | +task 'ci:full' do |
| 20 | data = [] | 12 | data = [] |
| 21 | failed = [] | 13 | failed = [] |
| 22 | AllTasks.each do |task| | 14 | AllTasks.each do |task| |