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

79 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada b19490f75d Use the built bundled gems in test-all as well as test-bundled-gems 2022-12-09 02:20:16 +09:00
Nobuyoshi Nakada cc33d07f46
Disable experimental warnings in test/runner.rb 2021-11-10 17:42:09 +09:00
Nobuyoshi Nakada fd96503f7b
Fix bundled gems locations
Changed since 55bf0ef1aa.
2021-07-30 12:21:38 +09:00
Nobuyoshi Nakada 8a89dd2a6c
No codesign in tests 2021-03-27 10:15:01 +09:00
Nobuyoshi Nakada 8e53d18e67
Separated tool/test/runner.rb and test/runner.rb
As `make test-tool` does not use gems, and no Rubygems stuffs is
needed, so moved such things to test/runner.rb.  Also no longer
nees `--test-target-dir` option.
2019-07-25 16:57:38 +09:00
Yusuke Endoh 24712eeec3 tool/test/runner.rb: support --test-target-dir option
tool/test/runner.rb had been copied from test/runner.rb.
test/runner.rb was for `make test-all`, and tool/test/runner.rb was for
`make test-testframework` and `make test-tool`.
But I want to avoid the code clones.

This change makes tool/test/runner.rb support --test-target-dir option
which allows tool/test/runner.rb to run `make test-all`.
Now we can remove test/runner.rb.
2019-07-21 19:19:08 +09:00
Hiroshi SHIBATA 897b1e0562
Fixed the wrong path for COVERAGE.
ref. c3c0e3f5c9
2019-07-02 08:00:29 +09:00
Hiroshi SHIBATA c3c0e3f5c9 Move to tool/lib from test/lib. 2019-07-02 07:59:54 +09:00
usa 7b2e74be7d the working directory may not be srcdir
* 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
2017-09-07 17:45:34 +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
naruse 3e92b635fb Add frozen_string_literal: false for all files
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
2015-12-16 05:07:31 +00:00
ko1 3dbb390180 * introduce new ISeq binary format serializer/de-serializer
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
2015-12-08 13:58:50 +00:00
ko1 7476be4def * test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.
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
2015-12-07 19:01:29 +00:00
hsbt ece64610d3 * test/runner.rb: use official repository for coverage tool.
* Makefile.in: ditto.
* common.mk: ditto.
* .gitignore: ignored third party repositories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 08:38:20 +00:00
hsbt de8c69313e * test/runner.rb: extracted test helper.
* test/lib/zombie_hunter.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06 11:18:30 +00:00
hsbt c4ee0df8ba * lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
* test/rake/*: ditto.
* tool/rbinstall.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 12:31:31 +00:00
akr fb2008a73a * test/lib/envutil.rb: Moved from test/ruby/.
* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:05:37 +00:00
hsbt 355c032fcf * test/runner.rb: reporting test coverage for test-all with COVERAGE env.
[Feature #10189][ruby-core:64681]
* Makefile.in: added task for coverage report.
* common.mk: added definition of forked simplecov url.
* .gitignore: ignored coverage directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 07:59:18 +00:00
hsbt 4af87bd672 * test/profile_test_all.rb: move into test library directory.
* test/runner.rb: fix require path for profile_test_all.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 09:16:56 +00:00
ko1 2aa6f9c2b7 * test/lib/tracepointchecker.rb: add to check TracePoint healthiness.
* test/runner.rb: use it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-20 08:22:09 +00:00
nobu 664d209de3 runner.rb: instance variable
* 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
2014-06-16 19:51:38 +00:00
ko1 dbf2578656 * test/runner.rb: failure message should be passed as an argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-16 10:01:44 +00:00
ko1 3a1c08e58f * test/runner.rb: capture TracePoint stat before setup and compare
it after teardown.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-16 09:45:03 +00:00
nobu dcae4b9d42 runner.rb: use class variable
* 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
2014-06-14 23:13:50 +00:00
nobu 045b6e9fb9 runner.rb: check increment
* test/runner.rb (after_teardown): check increment of active trace
  events.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-14 22:11:22 +00:00
nobu 5a83ce3f15 runner.rb: include event name
* 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
2014-06-14 21:54:11 +00:00
ko1 4945572f3c * vm_trace.c: add new method TracePoint.stat to debug
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
2014-06-13 09:01:21 +00:00
hsbt ecd452a8b0 * test/runner.rb: fixed randomly test failure.
[Bug #6573][ruby-core:45563]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27 08:34:11 +00:00
hsbt f8c6a5dc02 * test/runner.rb: remove dependency test-unit and minitest
from stdlib when running with test-all.
  [Feature #9711][ruby-core:61890]
* test/testunit/*.rb: ditto.
* test/lib: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17 06:26:51 +00:00
ko1 49dcd2fee4 * test/runner.rb: fix commit miss on r44278.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 16:55:01 +00:00
ko1 a0a1d0f268 * gc.c (gc_profile_dump_major_reason): fix this function because major_reason
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
2013-12-18 14:34:23 +00:00
ko1 769715bda5 * test/profile_test_all.rb: refactoring memory profiling tool for
test-all.
  Add profiling targets /proc/meminfo and /proc/self/status.
* test/runner.rb: accept other than 'true'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-16 08:46:21 +00:00
naruse 6f39ca4665 Show more portable and detailed info on NoMemoryError ref #8711
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-01 17:11:27 +00:00
naruse da5e757237 Show memory usage on NoMemoryError ref #8711
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-01 15:04:13 +00:00
naruse b0d4ffda6c revert r42255 ref #8711
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 15:01:39 +00:00
naruse fc3b9361d4 Show /proc/meminfo on NoMemoryError ref #8711
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 07:07:03 +00:00
naruse 1c3ea43f1b rescue NoMemoryError
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30 12:30:30 +00:00
naruse 6be21c1de0 remove debugging raise in previous commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30 07:08:28 +00:00
naruse 7b53830aea Show ObjectSpace.count_objects to debug NoMemoryError
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30 06:52:48 +00:00
nobu 058e6894bf test/runner.rb: reap zombies
* test/runner.rb (Test::Unit::ZombieHunter#after_teardown): reap zombies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:07 +00:00
drbrain 18a3774438 * test/runner.rb: Set GEM_HOME, GEM_PATH and GEM_SKIP to empty set.
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
2012-12-01 00:34:01 +00:00
nobu 5b657b5dcb runner.rb: no installed gems
* test/runner.rb: get rid of loading previously installed gems.
  [ruby-dev:46025]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:21:55 +00:00
nobu c3521bf631 test: skip default gems
* 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
2012-07-12 03:32:28 +00:00
nobu 2696fb9503 test: realpath
* 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
2012-06-08 07:19:38 +00:00
nobu dd2dfc71e7 * common.mk (RUN_OPT): disable gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 23:39:42 +00:00
naruse 05184578d7 * test/runner.rb: set Gem::TestCase's @@project_dir.
* 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
2011-03-22 01:59:18 +00:00
ryan 6e5f49770c Import rubygems 1.6.2 (release candidate @ 2026fbb5)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-09 22:32:29 +00:00
nobu 9c560af1b7 * bin/testrb, test/runner.rb, lib/test/unit.rb: improve backward
compatibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11 12:41:58 +00:00
nobu a3732110fb * common.mk (test-build): test for build process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06 13:55:15 +00:00
ko1 32623a1627 * test/profile_test_all.rb: added.
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
2010-10-29 14:35:53 +00:00