Commit e426d439 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Check return system value for gitlab test rake tasks

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7ad5fb53
...@@ -8,9 +8,8 @@ namespace :gitlab do ...@@ -8,9 +8,8 @@ namespace :gitlab do
] ]
cmds.each do |cmd| cmds.each do |cmd|
result = system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
raise "#{cmd} failed!"
raise "#{cmd} failed!" unless result
end end
end end
end end
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
def run_commands(cmds) def run_commands(cmds)
cmds.each do |cmd| cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
raise "#{cmd} failed!" unless $?.exitstatus.zero? raise "#{cmd} failed!"
end end
end end
...@@ -8,7 +8,7 @@ task :spinach do ...@@ -8,7 +8,7 @@ task :spinach do
] ]
cmds.each do |cmd| cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
raise "#{cmd} failed!" unless $?.exitstatus.zero? raise "#{cmd} failed!"
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment