diff options
author | Rémy Coutable <remy@rymai.me> | 2018-05-15 09:43:55 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-05-15 09:43:55 +0000 |
commit | a78b1b27b86d34c00e1b0631e967d637f8a6714b (patch) | |
tree | 1fd88726e0c5f1752c81219342b041708caee783 /lib | |
parent | eb55592a1b4835cf21bd0ff4e6638e92da799335 (diff) | |
parent | ee70fd55acf12065c96bd57ccfe218ef28e64f88 (diff) | |
download | gitlab-ce-a78b1b27b86d34c00e1b0631e967d637f8a6714b.tar.gz |
Merge branch 'blackst0ne-remove-spinach' into 'master'
Remove Spinach
Closes #23036
See merge request gitlab-org/gitlab-ce!18869
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gitlab/test.rake | 1 | ||||
-rw-r--r-- | lib/tasks/spinach.rake | 60 |
2 files changed, 0 insertions, 61 deletions
diff --git a/lib/tasks/gitlab/test.rake b/lib/tasks/gitlab/test.rake index 523b0fa055b..2222807fe13 100644 --- a/lib/tasks/gitlab/test.rake +++ b/lib/tasks/gitlab/test.rake @@ -4,7 +4,6 @@ namespace :gitlab do cmds = [ %w(rake brakeman), %w(rake rubocop), - %w(rake spinach), %w(rake spec), %w(rake karma) ] diff --git a/lib/tasks/spinach.rake b/lib/tasks/spinach.rake deleted file mode 100644 index 19ff13f06c0..00000000000 --- a/lib/tasks/spinach.rake +++ /dev/null @@ -1,60 +0,0 @@ -Rake::Task["spinach"].clear if Rake::Task.task_defined?('spinach') - -namespace :spinach do - namespace :project do - desc "GitLab | Spinach | Run project commits, issues and merge requests spinach features" - task :half do - run_spinach_tests('@project_commits,@project_issues,@project_merge_requests') - end - - desc "GitLab | Spinach | Run remaining project spinach features" - task :rest do - run_spinach_tests('~@admin,~@dashboard,~@profile,~@public,~@snippets,~@project_commits,~@project_issues,~@project_merge_requests') - end - end - - desc "GitLab | Spinach | Run project spinach features" - task :project do - run_spinach_tests('~@admin,~@dashboard,~@profile,~@public,~@snippets') - end - - desc "GitLab | Spinach | Run other spinach features" - task :other do - run_spinach_tests('@admin,@dashboard,@profile,@public,@snippets') - end - - desc "GitLab | Spinach | Run other spinach features" - task :builds do - run_spinach_tests('@builds') - end -end - -desc "GitLab | Run spinach" -task :spinach do - run_spinach_tests(nil) -end - -def run_system_command(cmd) - system({ 'RAILS_ENV' => 'test', 'force' => 'yes' }, *cmd) -end - -def run_spinach_command(args) - run_system_command(%w(spinach -r rerun) + args) -end - -def run_spinach_tests(tags) - success = run_spinach_command(%W(--tags #{tags})) - 3.times do |_| - break if success - break unless File.exist?('tmp/spinach-rerun.txt') - - tests = File.foreach('tmp/spinach-rerun.txt').map(&:chomp) - puts '' - puts "Spinach tests for #{tags}: Retrying tests... #{tests}".color(:red) - puts '' - sleep(3) - success = run_spinach_command(tests) - end - - raise("spinach tests for #{tags} failed!") unless success -end |