summaryrefslogtreecommitdiff
path: root/tool/lib
AgeCommit message (Collapse)Author
2020-12-01tune parallel testKoichi Sasada
This patch contains the fowllowing hacks: (1) Add "--timetable-data=FILE" option for test-all This option enables to dump timeline event contains worker, suite, and start/end time. (2) remove TestJIT in test_jit_debug.rb on parallel test. it is duplicated test. (3) move test_jit.rb and test_jit_debug.rb at first because these two tests are bottleneck of parallel tests. On my environment, `make test-all TESTS=-j12` reduced the total time 190 seconds -> 140 seconds. Notes: Merged: https://github.com/ruby/ruby/pull/3826
2020-11-24Report a full_message on a worker crashTakashi Kokubun
A worker crash happens very often, but we're not sure why. I'd like to know a backtrace if it's available.
2020-10-27freeze dynamic regexp literalsKoichi Sasada
Regexp literals are frozen, and also dynamically comppiled Regexp literals (/#{expr}/) are frozen. Notes: Merged: https://github.com/ruby/ruby/pull/3676
2020-10-08Expose assert, assert_respond_to and assert_not_respond_to for default gems.Hiroshi SHIBATA
2020-09-28Pass ASAN options to child environmentsAaron Patterson
I want to work with ASAN, but some child environments are not inheriting the ASAN options I'm using. This commit passes them to child environments if specified
2020-09-25Disable deprecation warning by the default [Feature #16345]Nobuyoshi Nakada
And `-w` option turns it on. Notes: Merged: https://github.com/ruby/ruby/pull/3481
2020-09-14Added just working Test::Unit::CoreAssertions#diffNobuyoshi Nakada
This is not "diff", but show expected and actual results both, just to get rid of `NoMethodError` when an assertion failed.
2020-09-09Revert the related commits about `Tempfile.open` change.Hiroshi SHIBATA
Start with https://github.com/ruby/ruby/commit/fa21985a7a2f8f52a8bd82bd12a724e9dca74934 to https://github.com/ruby/ruby/commit/d7492a0be885ea9f2b9f71e3e95582f9a859c439
2020-08-29Simplify Tempfile.open calls with a block as they now unlink the file ↵Benoit Daloze
automatically
2020-08-11Add default color for each instanceNobuyoshi Nakada
2020-07-28Use https instead of httpKazuhiro NISHIYAMA
2020-07-28Remove `EnvUtil.rubyexec`, because it is not used anywhere.Vít Ondruch
Notes: Merged: https://github.com/ruby/ruby/pull/3351
2020-07-15Check warning flags only if available to run with old versionsNobuyoshi Nakada
2020-07-10Show messages around the line when replacing failed in format_changelogKazuhiro NISHIYAMA
2020-07-02Expose `assert_pattern_list` for drb test with test-unit gem.Hiroshi SHIBATA
2020-06-15Prefer String#each_byte when using a blockNobuyoshi Nakada
2020-06-15tool/lib/minitest/unit.rb: Reproducible shuffle of test suitesYusuke Endoh
... based on CRC32 of names of the test suites. Formerly, `make test-all` randomized the order of the test suites by using `Array#shuffle`. It also shows `--seed N` to reproduce the order, but it was not reproducible when a suite set is different. This change sorts the suites by CRC32 hash of the suite names with a salt generated by the seed.
2020-06-03Fixed up 56ca006784dNobuyoshi Nakada
Run lldb just before sending ABRT or KILL signal. Some tests terminate child processes by TERM signal intentionally.
2020-06-02run lldb to investigate the stuck process.Koichi Sasada
Before sending signals (ABRT, KILL), use lldb to show the backtrace of a stuck process. This commit also reverts recent changes for terminate().
2020-06-01add more 2 sec.Koichi Sasada
After sending SEGV signal, but no response. Try to add 2 more seconds. If we can not have a detailed log, we need to use gdb/lldb to show the backtrace.
2020-06-01send SEGV to show backtrace.Koichi Sasada
send SEGV to terminate the remaining process before sending ABRT and KILL to show the backtrace.
2020-05-28Remove Ruby <2.2 support from tool/lib/vcs.rbJeremy Evans
BASERUBY now requires at least Ruby 2.2, so there is no point trying to support older ruby versions here. Notes: Merged: https://github.com/ruby/ruby/pull/2947
2020-05-27test/drb/test_drbssl.rb: skip LeakChecker as openssl keeps /dev/randomYusuke Endoh
and /dev/urandom intentionally. OpenSSL::PKey::RSA.new opens the two random generators and keeps the file descriptors. https://github.com/openssl/openssl/blob/93f99b681ab5a1cf7062053323e09b0cad5ff854/crypto/rand/rand_unix.c#L674 They are detected by the LeakChecker as fd leak, but it is intentional. http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20200526T160005Z.log.html.gz ``` [ 597/20199] DRbTests::TestDRbSSLAry#test_01 = 0.29 s Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 8 #<File::Stat dev=0x6, ino=11, mode=020666, nlink=1, uid=0, gid=0, rdev=0x109, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.751999995 +0000, mtime=2020-05-23 14:45:13.751999995 +0000, ctime=2020-05-23 14:45:13.751999995 +0000> Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 9 #<File::Stat dev=0x6, ino=10, mode=020666, nlink=1, uid=0, gid=0, rdev=0x108, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.755999995 +0000, mtime=2020-05-23 14:45:13.755999995 +0000, ctime=2020-05-23 14:45:13.755999995 +0000> ```
2020-05-17Added --test-order=nosort optionNobuyoshi Nakada
Run tests in the order given in the command line.
2020-05-16leakchecker.rb: show test nameNobuyoshi Nakada
When multiple autoclose IO objects are leaked too.
2020-05-08Workaround for Minitest5Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3087
2020-05-08Check encodings of STDIN,STDOUT,STDERR tooKazuhiro NISHIYAMA
2020-05-07leakchecker.rb: try `lsof`Nobuyoshi Nakada
2020-05-06Makes nil-safeNobuyoshi Nakada
2020-05-06Ignore FDs kept by system libraryNobuyoshi Nakada
`getaddrinfo` on macOS seems keeping FDs to query host names internally.
2020-05-06leakchecker.rb: search /dev/fd tooNobuyoshi Nakada
It is more popular than /proc/self/fd.
2020-05-05envutil.rb: Also alias to #nameNobuyoshi Nakada
2020-04-23Initialize the class variable for Minitest::Unit.current_repeat_countNobuyoshi Nakada
2020-04-23Expand retrying test file names to realpathNobuyoshi Nakada
As well as worker processes do in Test::Unit::Worker#run.
2020-04-17Rescue EPIPE in _reportNobuyoshi Nakada
Instead of letting callers rescue the error always.
2020-04-17core_assertions.rb: fixed fd leak at timeoutNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3039
2020-04-17envutil.rb: not try to close pipes twiceNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3039
2020-03-30Migrate {assert,refute}_patch_exits for compatibility with Minitest5Hiroshi SHIBATA
2020-03-08Specify explicit separator not to be affected by $;Nobuyoshi Nakada
2020-03-04tool/lib/test/unit: support TESTS='-- -ext-' again卜部昌平
There is a test directory named test/-ext-. Because this directry starts with a hyphen, we have to cheat test/unit in order for it to run the tests underneath. TESTS='-- -ext' worked for a long time. Let's not break that maneuver.
2020-03-04Narrow the check target.Koichi Sasada
Call GC.verify_internal_consistency only for Gem related test on i386-solaris.
2020-03-03Limit the debug code conditon so that it runs only under i386-solarisYusuke Endoh
2020-03-03add debug code for SolarisKoichi Sasada
Check heap consistency after each test to debug. https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20200303T012406Z.fail.html.gz
2020-03-01show backtrace.Koichi Sasada
assert_nothing_raised doesn't show the backtrace if an exception is thrown in a block. This patch shows this backtrace.
2020-02-28respect --test-order=randomKoichi Sasada
Now --test-order=random is simply ignored. This patch respect this option. Notes: Merged: https://github.com/ruby/ruby/pull/2932
2020-02-27MiniTest::Unit.options has default :seedKoichi Sasada
MiniTest::Unit (superclass of Test::Unit::Runner) does not has default seed parameter, but assigned after initializing. However some tests use MiniTest::Unit without setup of seed option and it cases unexpected test failures. To solve this issue, add default seed parameter 42.
2020-02-27`srand($seed)` at the beginning of each testKoichi Sasada
To avoid `srand(0)` effect in the other tests, call `srand($seed)` at the beginning of each test (setup). [Feature #16655]
2020-02-27Revert "`srand($seed)` at the beginning of each test"Koichi Sasada
This reverts commit 7c1553e91db07fed4fed3287b50304f1c69a685d. It breaks some tests.
2020-02-27`srand($seed)` at the beginning of each testKoichi Sasada
To avoid `srand(0)` effect in the other tests, call `srand($seed)` at the beginning of each test (setup). [Feature #16655]
2020-02-27don't ignore `--seed` optionKoichi Sasada
`--seed N` option is just ignored so respect this option. [Feature #16655] Also making "Run options" display pretty.