<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/tool/test-coverage.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Use Module#name instead of #inspect</title>
<updated>2020-05-28T05:39:53+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-05-28T05:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f186f2d01d26405047f5b43cf0e72a51c9bf54fe'/>
<id>f186f2d01d26405047f5b43cf0e72a51c9bf54fe</id>
<content type='text'>
Coverage measurement had failed since 7d5da30c9e9c572f6ef0aaccc1ca0e724966e2ee
https://github.com/ruby/actions/runs/708557030?check_suite_focus=true
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverage measurement had failed since 7d5da30c9e9c572f6ef0aaccc1ca0e724966e2ee
https://github.com/ruby/actions/runs/708557030?check_suite_focus=true
</pre>
</div>
</content>
</entry>
<entry>
<title>`make test-all COVERAGE=true` supports directory-separated build</title>
<updated>2018-04-05T01:05:16+00:00</updated>
<author>
<name>mame</name>
<email>mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-04-05T01:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4a7bf2efe702b64183259828de470d14df0f0031'/>
<id>4a7bf2efe702b64183259828de470d14df0f0031</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE</title>
<updated>2017-12-12T00:20:58+00:00</updated>
<author>
<name>mame</name>
<email>mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-12-12T00:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9b1d8ab7d0ab45a81dcd682accd1b5d3441fec25'/>
<id>9b1d8ab7d0ab45a81dcd682accd1b5d3441fec25</id>
<content type='text'>
A NEWS entry is also added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A NEWS entry is also added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamp method coverage to support define_method</title>
<updated>2017-12-05T07:16:42+00:00</updated>
<author>
<name>mame</name>
<email>mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-12-05T07:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0a6816ecd79fac5dfb32eb237f4c31bb45c9460d'/>
<id>0a6816ecd79fac5dfb32eb237f4c31bb45c9460d</id>
<content type='text'>
Traditionally, method coverage measurement was implemented by inserting
`trace2` instruction to the head of method iseq.  So, it just measured
methods defined by `def` keyword.

This commit drastically changes the measuring mechanism of method
coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t*
to runs (i.e., it counts the runs per method entry), and at
`Coverage.result`, it creates the result hash by enumerating all
`rb_method_entry_t*` objects (by `ObjectSpace.each_object`).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Traditionally, method coverage measurement was implemented by inserting
`trace2` instruction to the head of method iseq.  So, it just measured
methods defined by `def` keyword.

This commit drastically changes the measuring mechanism of method
coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t*
to runs (i.e., it counts the runs per method entry), and at
`Coverage.result`, it creates the result hash by enumerating all
`rb_method_entry_t*` objects (by `ObjectSpace.each_object`).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Measure branch and method coverage for `make test-all`</title>
<updated>2017-09-14T06:07:05+00:00</updated>
<author>
<name>mame</name>
<email>mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-09-14T06:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e43f304478fddea3ee8c53a82d5f9ae83b379768'/>
<id>e43f304478fddea3ee8c53a82d5f9ae83b379768</id>
<content type='text'>
To measure coverage of C code:
`./configure --enable-gcov &amp;&amp; make &amp;&amp; make exam &amp;&amp; make lcov`

To measure coverage of Ruby code:
`./configure &amp;&amp; make &amp;&amp; make exam COVERAGE=true &amp;&amp; make lcov`

To measure coverage of both languages at a time:
`./configure --enable-gcov &amp;&amp; make &amp;&amp; make exam COVERAGE=true &amp;&amp; make lcov`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To measure coverage of C code:
`./configure --enable-gcov &amp;&amp; make &amp;&amp; make exam &amp;&amp; make lcov`

To measure coverage of Ruby code:
`./configure &amp;&amp; make &amp;&amp; make exam COVERAGE=true &amp;&amp; make lcov`

To measure coverage of both languages at a time:
`./configure --enable-gcov &amp;&amp; make &amp;&amp; make exam COVERAGE=true &amp;&amp; make lcov`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Measure the test coverage without SimpleCov</title>
<updated>2017-09-07T15:40:29+00:00</updated>
<author>
<name>mame</name>
<email>mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-09-07T15:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ccaf52e244f7da1fc0061ecbc8025b46dcdfd53d'/>
<id>ccaf52e244f7da1fc0061ecbc8025b46dcdfd53d</id>
<content type='text'>
Now `make test-all COVERAGE=true` measures the test coverage by using
`coverage.so` directly, and visualize the result by simplecov-html.

There has been some problems in coverage measurement with SimpleCov.
(They are not SimpleCov's fault, though.)

(1) It is difficult to extract the measured data as a machine-readable
format, such as Marshal.  I want to visualize the coverage data with
other coverage tools, such as LCOV and Cobertura.
(I know we can use SimpleCov's formatter mechanism, but I don't want
to depend upon SimpleCov so much.)

(2) SimpleCov seems to miss some coverage data.  For example,
`lib/cgi.rb` and `lib/ostruct.rb` are dropped.  I don't know why.

(3) I have a plan to enhance `coverage.so` with branch coverage.
It would be difficult to continue to only use SimpleCov as is.
This is the most important reason.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now `make test-all COVERAGE=true` measures the test coverage by using
`coverage.so` directly, and visualize the result by simplecov-html.

There has been some problems in coverage measurement with SimpleCov.
(They are not SimpleCov's fault, though.)

(1) It is difficult to extract the measured data as a machine-readable
format, such as Marshal.  I want to visualize the coverage data with
other coverage tools, such as LCOV and Cobertura.
(I know we can use SimpleCov's formatter mechanism, but I don't want
to depend upon SimpleCov so much.)

(2) SimpleCov seems to miss some coverage data.  For example,
`lib/cgi.rb` and `lib/ostruct.rb` are dropped.  I don't know why.

(3) I have a plan to enhance `coverage.so` with branch coverage.
It would be difficult to continue to only use SimpleCov as is.
This is the most important reason.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
