Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-27 10:00:38 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-27 10:00:38 +0400
commit7c5d96cf5247e5f9a78c55d0ed8e8ccb92f016d2 (patch)
tree58cb4ee458738925d5504e706da98cb7fb471763
parentaef2122f81f08f13634dab56ab0913ef6d8efb02 (diff)
parent1e7fa8d99b52d89571b8e9581746561d00c383d5 (diff)
Merge branch 'improve-gitlab-test' into 'master'
Improve rake test Check for `system` call return value instead of `$?.exitstatus`
-rw-r--r--lib/tasks/gitlab/test.rake6
-rw-r--r--lib/tasks/spec.rake3
-rw-r--r--lib/tasks/spinach.rake3
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