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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-22 15:14:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-22 15:14:34 +0300
commit26fa51816ab94df9c2f3db8c93da4d57f7bd6fc4 (patch)
tree3b29671cb4bc910500d8c7db4e2694b4c012387e /spec/support
parent6b0293c14dce817f72310127dd38562313321b1b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/rspec_run_time.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/rspec_run_time.rb b/spec/support/rspec_run_time.rb
index 3491e5f733a..2cfa4008fd3 100644
--- a/spec/support/rspec_run_time.rb
+++ b/spec/support/rspec_run_time.rb
@@ -101,7 +101,11 @@ module Support
end
def load_average
- `uptime`[/(load average:[^\n]+)/, 1]
+ if File.exist?('/proc/loadavg')
+ "load average: #{File.read('/proc/loadavg')}"
+ else
+ `uptime`[/(load average:[^\n]+)/, 1] || '(uptime failed)'
+ end
end
end
end