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
|
end
|
||||||
|
|
||||||
desc "Smoke-test all projects"
|
desc "Smoke-test all projects"
|
||||||
task :smoke do
|
task :smoke, [:frameworks, :isolated] do |task, args|
|
||||||
(FRAMEWORKS - %w(activerecord)).each do |project|
|
frameworks = args[:frameworks] ? args[:frameworks].split(" ") : FRAMEWORKS
|
||||||
system %(cd #{project} && #{$0} test:isolated --trace)
|
# 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
|
end
|
||||||
system %(cd activerecord && #{$0} sqlite3:isolated_test --trace)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Install gems for all projects."
|
desc "Install gems for all projects."
|
||||||
|
|
Loading…
Reference in New Issue