Check return system value for gitlab test rake tasks

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-05-26 21:54:57 +03:00
parent 7ad5fb53ac
commit e426d43924
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
3 changed files with 6 additions and 7 deletions

View file

@ -8,9 +8,8 @@ namespace :gitlab do
]
cmds.each do |cmd|
result = system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
raise "#{cmd} failed!" unless result
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
raise "#{cmd} failed!"
end
end
end

View file

@ -40,7 +40,7 @@ end
def run_commands(cmds)
cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
raise "#{cmd} failed!" unless $?.exitstatus.zero?
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
raise "#{cmd} failed!"
end
end

View file

@ -8,7 +8,7 @@ task :spinach do
]
cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
raise "#{cmd} failed!" unless $?.exitstatus.zero?
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
raise "#{cmd} failed!"
end
end