diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-27 06:00:38 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-27 06:00:38 +0000 |
commit | 7c5d96cf5247e5f9a78c55d0ed8e8ccb92f016d2 (patch) | |
tree | 58cb4ee458738925d5504e706da98cb7fb471763 /lib | |
parent | aef2122f81f08f13634dab56ab0913ef6d8efb02 (diff) | |
parent | 1e7fa8d99b52d89571b8e9581746561d00c383d5 (diff) | |
download | gitlab-ce-7c5d96cf5247e5f9a78c55d0ed8e8ccb92f016d2.tar.gz |
Merge branch 'improve-gitlab-test' into 'master'
Improve rake test
Check for `system` call return value instead of `$?.exitstatus`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gitlab/test.rake | 6 | ||||
-rw-r--r-- | lib/tasks/spec.rake | 3 | ||||
-rw-r--r-- | lib/tasks/spinach.rake | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/lib/tasks/gitlab/test.rake b/lib/tasks/gitlab/test.rake index 9516210e205..5b937ce0a28 100644 --- a/lib/tasks/gitlab/test.rake +++ b/lib/tasks/gitlab/test.rake @@ -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 diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake index 49fbe1bd47a..bee22300298 100644 --- a/lib/tasks/spec.rake +++ b/lib/tasks/spec.rake @@ -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 diff --git a/lib/tasks/spinach.rake b/lib/tasks/spinach.rake index c23d0e0e188..dcc7d0fe01c 100644 --- a/lib/tasks/spinach.rake +++ b/lib/tasks/spinach.rake @@ -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 |