aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-09 04:22:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-09 04:22:50 +0000
commite1e223a874d99325f2ddbca5d0f950ba0c2e6c2d (patch)
tree5f85b1bc5760c8eb4c3da13b7d9e7108951b34e2 /test/lib/test
parentb3f4db922756d034daa1e2aa27278ea10d94de55 (diff)
downloadruby-e1e223a874d99325f2ddbca5d0f950ba0c2e6c2d.tar.gz
memory_status.rb: independent of MiniTest
* test/lib/memory_status.rb: make Memory::Status independent of MiniTest::Skip. * test/lib/test/unit/assertions.rb (assert_no_memory_leak): skip if Memory::Status is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/test')
-rw-r--r--test/lib/test/unit/assertions.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index 25c0c10ae8..dd4e0fccf0 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -638,6 +638,8 @@ eom
def assert_no_memory_leak(args, prepare, code, message=nil, limit: 2.0, rss: false, **opt)
require_relative '../../memory_status'
+ raise MiniTest::Skip, "unsupported platform" unless defined?(Memory::Status)
+
token = "\e[7;1m#{$$.to_s}:#{Time.now.strftime('%s.%L')}:#{rand(0x10000).to_s(16)}:\e[m"
token_dump = token.dump
token_re = Regexp.quote(token)