Kazuhiro NISHIYAMA
946cd6c534
Use https instead of http
2020-07-28 19:51:54 +09:00
Vít Ondruch
db0eab1c6f
Remove EnvUtil.rubyexec
, because it is not used anywhere.
2020-07-28 12:11:47 +09:00
Nobuyoshi Nakada
9f4b7fc82e
Check warning flags only if available to run with old versions
2020-07-15 23:33:24 +09:00
Kazuhiro NISHIYAMA
82489f0242
Show messages around the line when replacing failed in format_changelog
2020-07-10 19:27:11 +09:00
Hiroshi SHIBATA
59ded36c60
Expose assert_pattern_list
for drb test with test-unit gem.
2020-07-02 20:53:42 +09:00
Nobuyoshi Nakada
2a20c17982
Prefer String#each_byte when using a block
2020-06-15 16:20:56 +09:00
Yusuke Endoh
8f99bfa26d
tool/lib/minitest/unit.rb: Reproducible shuffle of test suites
...
... 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-15 13:56:01 +09:00
Nobuyoshi Nakada
eb2b7fca43
Fixed up 56ca006784
...
Run lldb just before sending ABRT or KILL signal. Some tests
terminate child processes by TERM signal intentionally.
2020-06-03 17:28:15 +09:00
Koichi Sasada
56ca006784
run lldb to investigate the stuck process.
...
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-02 17:21:03 +09:00
Koichi Sasada
7b9527ce74
add more 2 sec.
...
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-01 17:03:27 +09:00
Koichi Sasada
3591703b31
send SEGV to show backtrace.
...
send SEGV to terminate the remaining process before sending
ABRT and KILL to show the backtrace.
2020-06-01 10:15:03 +09:00
Jeremy Evans
07b2102a88
Remove Ruby <2.2 support from tool/lib/vcs.rb
...
BASERUBY now requires at least Ruby 2.2, so there is no point
trying to support older ruby versions here.
2020-05-28 07:57:29 -07:00
Yusuke Endoh
962c302a1a
test/drb/test_drbssl.rb: skip LeakChecker as openssl keeps /dev/random
...
and /dev/urandom intentionally. OpenSSL::PKey::RSA.new opens the two
random generators and keeps the file descriptors.
93f99b681a/crypto/rand/rand_unix.c (L674)
They are detected by the LeakChecker as fd leak, but it is intentional.
20200526
T160005Z.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-27 02:07:38 +09:00
Nobuyoshi Nakada
968d6df49f
Added --test-order=nosort option
...
Run tests in the order given in the command line.
2020-05-17 16:34:06 +09:00
Nobuyoshi Nakada
8c3a60df2a
leakchecker.rb: show test name
...
When multiple autoclose IO objects are leaked too.
2020-05-16 17:35:09 +09:00
Hiroshi SHIBATA
1fe2b7f41c
Workaround for Minitest5
2020-05-08 07:38:50 +09:00
Kazuhiro NISHIYAMA
22b1e824d7
Check encodings of STDIN,STDOUT,STDERR too
2020-05-08 00:12:48 +09:00
Nobuyoshi Nakada
545d2ab7d2
leakchecker.rb: try lsof
2020-05-07 02:58:28 +09:00
Nobuyoshi Nakada
de3f725978
Makes nil-safe
2020-05-06 14:09:03 +09:00
Nobuyoshi Nakada
b247ac086e
Ignore FDs kept by system library
...
`getaddrinfo` on macOS seems keeping FDs to query host names
internally.
2020-05-06 13:47:09 +09:00
Nobuyoshi Nakada
039a8ef786
leakchecker.rb: search /dev/fd too
...
It is more popular than /proc/self/fd.
2020-05-06 10:09:29 +09:00
Nobuyoshi Nakada
f0b5629c8c
envutil.rb: Also alias to #name
2020-05-05 13:53:44 +09:00
Nobuyoshi Nakada
d1f50b9872
Initialize the class variable for Minitest::Unit.current_repeat_count
2020-04-23 10:44:27 +09:00
Nobuyoshi Nakada
2e87488d13
Expand retrying test file names to realpath
...
As well as worker processes do in Test::Unit::Worker#run.
2020-04-23 10:25:09 +09:00
Nobuyoshi Nakada
3152977b31
Rescue EPIPE in _report
...
Instead of letting callers rescue the error always.
2020-04-17 14:25:20 +09:00
Nobuyoshi Nakada
3cca0d1958
core_assertions.rb: fixed fd leak at timeout
2020-04-17 00:52:29 +09:00
Nobuyoshi Nakada
e231f8e8a8
envutil.rb: not try to close pipes twice
2020-04-17 00:52:29 +09:00
Hiroshi SHIBATA
e5db3da9d3
Migrate {assert,refute}_patch_exits for compatibility with Minitest5
2020-03-30 21:32:26 +09:00
Nobuyoshi Nakada
2b7409a2f2
Specify explicit separator not to be affected by $;
2020-03-08 17:38:37 +09:00
卜部昌平
f7048f9d55
tool/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-04 12:30:42 +09:00
Koichi Sasada
cf52f37cae
Narrow the check target.
...
Call GC.verify_internal_consistency only for Gem related test
on i386-solaris.
2020-03-04 11:25:43 +09:00
Yusuke Endoh
43ed4eb6d1
Limit the debug code conditon so that it runs only under i386-solaris
2020-03-03 21:00:03 +09:00
Koichi Sasada
1ad9364440
add debug code for Solaris
...
Check heap consistency after each test to debug.
20200303
T012406Z.fail.html.gz
2020-03-03 15:53:46 +09:00
Koichi Sasada
413c98003b
show backtrace.
...
assert_nothing_raised doesn't show the backtrace if an exception
is thrown in a block. This patch shows this backtrace.
2020-03-01 03:02:05 +09:00
Koichi Sasada
28399e4e0f
respect --test-order=random
...
Now --test-order=random is simply ignored. This patch respect
this option.
2020-02-28 17:44:23 +09:00
Koichi Sasada
6b30638bdb
MiniTest::Unit.options has default :seed
...
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 04:06:28 +09:00
Koichi Sasada
14f1790807
srand($seed)
at the beginning of each test
...
To avoid `srand(0)` effect in the other tests, call `srand($seed)`
at the beginning of each test (setup).
[Feature #16655 ]
2020-02-27 03:47:41 +09:00
Koichi Sasada
f9d314245b
Revert "srand($seed)
at the beginning of each test"
...
This reverts commit 7c1553e91d
.
It breaks some tests.
2020-02-27 02:45:09 +09:00
Koichi Sasada
7c1553e91d
srand($seed)
at the beginning of each test
...
To avoid `srand(0)` effect in the other tests, call `srand($seed)`
at the beginning of each test (setup).
[Feature #16655 ]
2020-02-27 02:29:57 +09:00
Koichi Sasada
116c632095
don't ignore --seed
option
...
`--seed N` option is just ignored so respect this option.
[Feature #16655 ]
Also making "Run options" display pretty.
2020-02-27 02:26:14 +09:00
Hiroshi SHIBATA
9b2e671944
Expose assert_no_memory_leak for weakref
2020-02-11 13:29:23 +09:00
Hiroshi SHIBATA
a5d7b8e13d
Expose assert_normal_exit for weakref
2020-02-11 13:29:23 +09:00
Nobuyoshi Nakada
a3fb97465d
Stop auto runner
...
Auto runner should not run in forked processes in separated tests.
2020-02-07 13:43:50 +09:00
Nobuyoshi Nakada
3d21a75c72
No crafted backtrace for SystemExit
...
As SystemExit is ignored, it is just useless.
2020-02-07 11:09:19 +09:00
Nobuyoshi Nakada
5fac54a594
Fixed the output from separated test in parallel test
...
Redirect the output of separated child process to
`MiniTest::Unit.output`.
2020-02-06 20:53:11 +09:00
Nobuyoshi Nakada
f1c230f18b
Add separated assertion count
2020-02-06 20:52:25 +09:00
Nobuyoshi Nakada
0226d72e95
Fixed the output from separated test in parallel test
...
To output to the STDOUT of the parent process according to the
parallel test protocol, should send to the `MiniTest::Unit.output`
instead of each own STDOUT.
2020-02-05 09:39:14 +09:00
Nobuyoshi Nakada
6fe44576b9
Fixed FD leaks
2020-02-05 09:30:12 +09:00
Nobuyoshi Nakada
c6cd4206df
Get rid of nested string interpolations to be editor-friendly
2020-02-05 08:53:21 +09:00
NARUSE, Yui
390a9d3b72
just use STDOUT
2020-02-04 21:51:57 +09:00