Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
mame 9b1d8ab7d0 ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE
A NEWS entry is also added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 00:20:58 +00:00
mame 0a6816ecd7 Revamp method coverage to support define_method
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
2017-12-05 07:16:42 +00:00
mame e43f304478 Measure branch and method coverage for `make test-all`
To measure coverage of C code:
`./configure --enable-gcov && make && make exam && make lcov`

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

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 06:07:05 +00:00
mame ccaf52e244 Measure the test coverage without SimpleCov
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
2017-09-07 15:40:29 +00:00