`(ulimit -n 30; make test-tool)` fails with unexplicit message:
"undefined method `write' for nil:NilClass" due to lack of stdout.
This change makes it explicit. [Bug #5577]
`exception_details` is not defined anywhere.
This commit fixes the following test crash in ruby 2.4
```
Error: test_assert_output_lines(TestFileUtils): NoMethodError: undefined method `exception_details' for #<TestFileUtils:0x00005556ef699178>
```
And replaces it with an actual test failure:
```
[Test::Unit::CoreAssertions::MiniTest::Assertion] exception expected, not #<NoMethodError: undefined method `full_message' for #<RuntimeError: ok>
Did you mean? message>.
```
https://github.com/ruby/fileutils/commit/2f38ba6e82
This removes the security features added by $SAFE = 1, and warns for access
or modification of $SAFE from Ruby-level, as well as warning when calling
all public C functions related to $SAFE.
This modifies some internal functions that took a safe level argument
to no longer take the argument.
rb_require_safe now warns, rb_require_string has been added as a
version that takes a VALUE and does not warn.
One public C function that still takes a safe level argument and that
this doesn't warn for is rb_eval_cmd. We may want to consider
adding an alternative method that does not take a safe level argument,
and warn for rb_eval_cmd.
by using ObjectSpace.trace_object_allocations.
`make test-all LEAK_CHECKER_TRACE_OBJECT_ALLOCATION=true` will print not
only leaked fds but also where it was created.
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/2380788
```
test_all #<Thread:0x000055b6c8e9fca8@/tmp/ruby/v2/src/trunk-mjit/tool/lib/test/unit/parallel.rb:42 run> terminated with exception (report_on_exception is true):
<internal:pack>:134:in `pack': no implicit conversion of false into String (TypeError)
from /tmp/ruby/v2/src/trunk-mjit/tool/lib/test/unit/parallel.rb:160:in `_report'
from /tmp/ruby/v2/src/trunk-mjit/tool/lib/test/unit/parallel.rb:45:in `block in _run_suite'
```
This reverts commit 43015275b9.
`assert_raise_message` in test-unit is different from
`assert_raise_with_message`. It checks the exception message
only, but not the exception class,
parallel test (`make test-all TESTS=-j8`) runs tests on specified
number of processes. However, some test checkers written in
`runner.rb` are not loaded. This fix enable these checkers on
parallel tests.
See also: https://github.com/ruby/ruby/pull/2508
There are random failures:
> lib/rubygems/core_ext/kernel_require.rb:61:in `require':
> wrong number of arguments (given 1, expected 0) (ArgumentError)
http://ci.rvm.jp/results/trunk-jemalloc@silicon-docker/2275159
To check this failure, I added a small check code.
Parents commit hashs in logs of merge commits are abbreviated to
necessary length depending on the repositories. Exclude merge
commits from ChangeLog to make it stable.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-master/log/20190824T153002Z.fail.html.gz
```
/home/gentoo/chkbuild/tmp/build/20190824T153002Z/ruby/tool/lib/vcs.rb:577:in `export_changelog': cannot find the beginning revision of the branch (RuntimeError)
from ./tool/make-snapshot:353:in `block in package'
from ./tool/make-snapshot:351:in `chdir'
from ./tool/make-snapshot:351:in `package'
from ./tool/make-snapshot:523:in `block in <main>'
from ./tool/make-snapshot:523:in `collect'
from ./tool/make-snapshot:523:in `<main>'
```
`make test-all TESTS=name` can specify running test files by name.
name can be dirname ('dir/') or a file ('.../test_foo.rb'). This
patch complement `test_` prefix for a test. So we only need to
specify `TESTS=ruby/hash` which means `TESTS=ruby/test_hash.rb`.
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.
for test-all rule, we can specify a file with TESTS option like
`TESTS=test_xxx.rb`. However, we can eliminate last '.rb' suffix
so this patch try with '.rb' suffix if the given path is not available.