2021-02-05 07:09:31 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-03-14 05:06:10 -04:00
|
|
|
Rake::Task["test"].clear
|
|
|
|
|
2021-04-19 08:09:04 -04:00
|
|
|
desc "GitLab | List rake tasks for tests"
|
2014-03-14 05:06:10 -04:00
|
|
|
task :test do
|
2021-04-19 08:09:04 -04:00
|
|
|
puts "Running the full GitLab test suite takes significant time to pass. We recommend using one of the following spec tasks:\n\n"
|
|
|
|
|
|
|
|
spec_tasks = Rake::Task.tasks.select { |t| t.name.start_with?('spec:') }
|
|
|
|
longest_task_name = spec_tasks.map { |t| t.name.size }.max
|
|
|
|
|
|
|
|
spec_tasks.each do |task|
|
|
|
|
puts "#{"%-#{longest_task_name}s" % task.name} | #{task.full_comment}"
|
|
|
|
end
|
|
|
|
|
|
|
|
puts "\nLearn more at https://docs.gitlab.com/ee/development/rake_tasks.html#run-tests."
|
2014-03-14 05:06:10 -04:00
|
|
|
end
|