* test/runner.rb (COVERAGE): should use require_relative instead of require,
because the working directory may not be srcdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
and a pre-compilation/runtime loader sample.
[Feature #11788]
* iseq.c: add new methods:
* RubyVM::InstructionSequence#to_binary_format(extra_data = nil)
* RubyVM::InstructionSequence.from_binary_format(binary)
* RubyVM::InstructionSequence.from_binary_format_extra_data(binary)
* compile.c: implement body of this new feature.
* load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq):
call RubyVM::InstructionSequence.load_iseq(fname) with
loading script name if this method is defined.
We can return any ISeq object as a result value.
Otherwise loading will be continue as usual.
This interface is not matured and is not extensible.
So that we don't guarantee the future compatibility of this method.
Basically, you should'nt use this method.
* iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions)
from iseq.c.
* encoding.c (rb_data_is_encoding), internal.h: added.
* vm_core.h: add several supports for lazy load.
* add USE_LAZY_LOAD macro to specify enable or disable of
this feature.
* add several fields to rb_iseq_t.
* introduce new macro rb_iseq_check().
* insns.def: some check for lazy loading feature.
* vm_insnhelper.c: ditto.
* proc.c: ditto.
* vm.c: ditto.
* test/lib/iseq_loader_checker.rb: enabled iff suitable
environment variables are provided.
* test/runner.rb: enable lib/iseq_loader_checker.rb.
* sample/iseq_loader.rb: add sample compiler and loader.
$ ruby sample/iseq_loader.rb [dir]
will compile all ruby scripts in [dir].
With default setting, this compile creates *.rb.yarb files
in same directory of target .rb scripts.
$ ruby -r sample/iseq_loader.rb [app]
will run with enable to load compiled binary data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
If you enable this checker (remove `#' in test/runner.rb),
you can see comparison results between an original iseq disassembed
result and dumped and loaded iseq disassembed result.
There are several bugs around there, because of inexact stack depth
calculation. Now, I leave these bugs because they are not critical
and difficult to solve completely.
* test/runner.rb: require test/lib/iseq_loader_checker.rb but
disabled at default (commented out).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/runner.rb (before_setup, after_teardown): use an instance
variable instead of a class variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/runner.rb (after_teardown): turn zombie traces hash into a
class variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/runner.rb (after_teardown): include active trace event name
in the failure message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
TracePoint mechanism.
Ruby users should not use this method. So I don't note this method
in the NEWS file.
* test/runner.rb: detect zombie active TracePoints with
TracePoint.stat.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
can be OR of multiple reasons.
* gc.c (gc_profile_dump_on): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
With default_gem support in RubyGems GEM_SKIP prevents loading of
built-in gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/runner.rb: skip default gems to get rid of loading old versions
before installation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/runner.rb (src_testdir): expand real path so that
TestGem#test_self_find_files does not fail by aliased load path when
srcdir contains a symbolic link.
* tool/runruby.rb (srcdir): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/test_case.rb: set Gem::TestCase's @@project_dir only
when it is not defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
You can use test-all profiler with the following command:
RUBY_TEST_ALL_PROFILE=true make test-all
This command generates ./test_all_profile and you can analyse
which tests consume memories.
* test/runner.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Test::Unit, and install runner before loading test/minitest.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
any tests have not run.
* bin/testrb, test/runner.rb: use Test::Unit.start.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e