diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/rspec_run_time.rb | 6 |
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 |