From dda935046a73574e66cdedb1a9a2db6dba713e2c Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 28 Jul 2014 17:31:05 -0300 Subject: [PATCH] Improve plugin test runs --- lib/tasks/plugins_tests.rake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/tasks/plugins_tests.rake b/lib/tasks/plugins_tests.rake index 90bd612..2d9eb19 100644 --- a/lib/tasks/plugins_tests.rake +++ b/lib/tasks/plugins_tests.rake @@ -1,4 +1,5 @@ @all_plugins = Dir.glob('plugins/*').map { |f| File.basename(f) } - ['template'] +@all_plugins.sort! @all_tasks = [:units, :functionals, :integration, :cucumber, :selenium] def enabled_plugins @@ -110,7 +111,7 @@ def run_cucumber(profile, files) sh 'xvfb-run', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files end -def custom_run(name, files, run=:individually) +def custom_run(name, files, run=:all) case run when :all run_test name, files @@ -122,7 +123,7 @@ def custom_run(name, files, run=:individually) end end -def run_tests(name, plugins, run=:individually) +def run_tests(name, plugins, run=:all) plugins = Array(plugins) glob = "plugins/{#{plugins.join(',')}}/test/#{task2folder(name)}/**/*.#{task2ext(name)}" files = Dir.glob(glob) @@ -169,7 +170,7 @@ def test_sequence(plugins, tasks) fail 'There are broken tests to be fixed!' if fail_flag end -def plugin_test_task(plugin, task, run=:individually) +def plugin_test_task(plugin, task, run=:all) desc "Run #{task} tests for #{plugin_name(plugin)}" task task do test_sequence(plugin, task) -- libgit2 0.21.2