mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
memory_status.rb: find proper ps
* test/ruby/memory_status.rb (Memory::PSCMD): use ps command which outputs expected result. [ruby-dev:48370] [Bug #10010] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65accad30a
commit
286eaeb24f
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Jul 8 16:58:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/memory_status.rb (Memory::PSCMD): use ps command which
|
||||
outputs expected result. [ruby-dev:48370] [Bug #10010]
|
||||
|
||||
Tue Jul 8 14:45:17 2014 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* parse.y (dsymbol_alloc): set global_symbols.minor_marked to 0.
|
||||
|
|
|
@ -82,8 +82,12 @@ module Memory
|
|||
end
|
||||
end
|
||||
else
|
||||
PSCMD = ["ps", "-ovsz=","-orss=", "-p"]
|
||||
PAT = /^\s*(\d+)\s+(\d+)$/
|
||||
require_relative 'find_executable'
|
||||
if PSCMD = EnvUtil.find_executable("ps", "-ovsz=", "-orss=", "-p", $$.to_s) {|out| PAT =~ out}
|
||||
PSCMD.pop
|
||||
end
|
||||
raise MiniTest::Skip, "ps command not found" unless PSCMD
|
||||
|
||||
keys << :size << :rss
|
||||
def self.read_status
|
||||
|
|
Loading…
Add table
Reference in a new issue