summaryrefslogtreecommitdiff
path: root/tool/test-coverage.rb
AgeCommit message (Collapse)Author
2023-01-26Filter spec directory for code coverageHiroshi SHIBATA
2023-01-26Ignore all of tool directory from code coverage, It contains tool/test and etc.Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7185
2023-01-26Ignore vendored libraries by rubygems from code coverageHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7185
2023-01-26filter coverage result with vendored libraries and test codeHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7185
2023-01-25Support simplecov-0.22.0.Hiroshi SHIBATA
simplecov-0.22.0 no longer support pre-0.18 result format. result data needs `lines` key for coverage data.
2023-01-18Switch to use gem version of simplecov, not git cloneHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7137
2020-05-28Use Module#name instead of #inspectYusuke Endoh
Coverage measurement had failed since 7d5da30c9e9c572f6ef0aaccc1ca0e724966e2ee https://github.com/ruby/actions/runs/708557030?check_suite_focus=true
2018-04-05`make test-all COVERAGE=true` supports directory-separated buildmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODEmame
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-05Revamp method coverage to support define_methodmame
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-09-14Measure branch and method coverage for `make test-all`mame
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-07Measure the test coverage without SimpleCovmame
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