mirror of https://github.com/rails/rails
Merge pull request #52101 from ioquatix/fast-smoke-tests
Add support for fast smoke tests.
This commit is contained in:
commit
f805261ede
21
Rakefile
21
Rakefile
|
@ -34,11 +34,24 @@ task default: %w(test test:isolated)
|
|||
end
|
||||
|
||||
desc "Smoke-test all projects"
|
||||
task :smoke do
|
||||
(FRAMEWORKS - %w(activerecord)).each do |project|
|
||||
system %(cd #{project} && #{$0} test:isolated --trace)
|
||||
task :smoke, [:frameworks, :isolated] do |task, args|
|
||||
frameworks = args[:frameworks] ? args[:frameworks].split(" ") : FRAMEWORKS
|
||||
# The arguments are positional, and users may want to specify only the isolated flag.. so we allow 'all' as a default for the first argument:
|
||||
if frameworks.include?("all")
|
||||
frameworks = FRAMEWORKS
|
||||
end
|
||||
|
||||
isolated = args[:isolated].nil? ? true : args[:isolated] == "true"
|
||||
test_task = isolated ? "test:isolated" : "test"
|
||||
|
||||
(frameworks - ["activerecord"]).each do |project|
|
||||
system %(cd #{project} && #{$0} #{test_task} --trace)
|
||||
end
|
||||
|
||||
if frameworks.include? "activerecord"
|
||||
test_task = isolated ? "sqlite3:isolated_test" : "sqlite3:test"
|
||||
system %(cd activerecord && #{$0} #{test_task} --trace)
|
||||
end
|
||||
system %(cd activerecord && #{$0} sqlite3:isolated_test --trace)
|
||||
end
|
||||
|
||||
desc "Install gems for all projects."
|
||||
|
|
Loading…
Reference in New Issue