Commit 7c5d96cf authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'improve-gitlab-test' into 'master'

Improve rake test

Check for `system` call return value instead of `$?.exitstatus`
parents aef2122f 1e7fa8d9
......@@ -8,9 +8,7 @@ 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) or raise("#{cmd} failed!")
end
end
end
end
\ No newline at end of file
......@@ -40,7 +40,6 @@ 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) or raise("#{cmd} failed!")
end
end
......@@ -8,7 +8,6 @@ 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) or raise("#{cmd} failed!")
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