mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: Fix plugin:spec task return code (#21661)
Regressed in eec10efc3dfad0d274cadb60e9e45f2a345b2a5d. It means that backend plugin spec failures in CI were not failing the spec suite. Fixes recent regressions and skips two of them - to be handled next week. --------- Co-authored-by: Andrei Prigorshnev <a.prigorshnev@gmail.com>
This commit is contained in:
@ -178,11 +178,13 @@ def spec(plugin, parallel: false, argv: nil)
|
||||
# reject system specs as they are slow and need dedicated setup
|
||||
files =
|
||||
Dir.glob("./plugins/#{plugin}/spec/**/*_spec.rb").reject { |f| f.include?("spec/system/") }.sort
|
||||
|
||||
if files.length > 0
|
||||
cmd = parallel ? "bin/turbo_rspec" : "bin/rspec"
|
||||
puts cmd if !parallel
|
||||
|
||||
system("LOAD_PLUGINS=1 #{cmd} #{files.join(" ")} #{params.join(" ")}")
|
||||
Rake::FileUtilsExt.verbose(!parallel) do
|
||||
sh("LOAD_PLUGINS=1 #{cmd} #{files.join(" ")} #{params.join(" ")}")
|
||||
end
|
||||
else
|
||||
abort "No specs found."
|
||||
end
|
||||
|
Reference in New Issue
Block a user