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:
Jarek Radosz
2023-05-19 16:17:02 +02:00
committed by GitHub
parent 774313ef0f
commit 7f85624a01
7 changed files with 14 additions and 16 deletions

View File

@ -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