diff options
author | Koichi Sasada <ko1@atdot.net> | 2022-12-28 15:46:16 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2022-12-28 15:46:16 +0900 |
commit | 393192160726d6b299ca1f66fad9414e4bf8109a (patch) | |
tree | fdaf071d5cd4cbfaa5bf4cc3f86c83ffd10f8f7f | |
parent | c6c7f5900f8664ec9cab0c300324f973aa911d9b (diff) | |
download | ruby-393192160726d6b299ca1f66fad9414e4bf8109a.tar.gz |
add debug print for the failure
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sp2-docker/4364584
```
1) Failure:
TestObjSpace#test_dump_all [/tmp/ruby/src/trunk-gc-asserts/test/objspace/test_objspace.rb:599]:
number of strings.
<2> expected but was
<3>.
```
-rw-r--r-- | test/objspace/test_objspace.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index f0f294c31a..32cd1eda24 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -580,7 +580,14 @@ class TestObjSpace < Test::Unit::TestCase # This test makes assertions on the assignment to `str`, so we look for # the second appearance of /TEST STRING/ in the output test_string_in_dump_all = output.grep(/TEST2/) - assert_equal(2, test_string_in_dump_all.size, "number of strings") + + begin + assert_equal(2, test_string_in_dump_all.size, "number of strings") + rescue Exception => e + STDERR.puts e.inspect + STDERR.puts test_string_in_dump_all + raise + end entry_hash = JSON.parse(test_string_in_dump_all[1]) |