diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-26 21:54:57 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-26 21:54:57 +0300 |
commit | e426d43924be265d4834f47fd765895dde6017fb (patch) | |
tree | 99c482cd71e822fc9e4d83fe2a5ab4efed6e4023 /lib/tasks | |
parent | 7ad5fb53ac4e14b22684a0d4904ccf724fd4e082 (diff) | |
download | gitlab-ce-e426d43924be265d4834f47fd765895dde6017fb.tar.gz |
Check return system value for gitlab test rake tasks
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/test.rake | 5 | ||||
-rw-r--r-- | lib/tasks/spec.rake | 4 | ||||
-rw-r--r-- | lib/tasks/spinach.rake | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/tasks/gitlab/test.rake b/lib/tasks/gitlab/test.rake index 9516210e205..f38fe7810c1 100644 --- a/lib/tasks/gitlab/test.rake +++ b/lib/tasks/gitlab/test.rake @@ -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 diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake index 49fbe1bd47a..a7cd7483bed 100644 --- a/lib/tasks/spec.rake +++ b/lib/tasks/spec.rake @@ -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 diff --git a/lib/tasks/spinach.rake b/lib/tasks/spinach.rake index c23d0e0e188..ebcce1e650c 100644 --- a/lib/tasks/spinach.rake +++ b/lib/tasks/spinach.rake @@ -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 |