Takashi Kokubun
30fba5f37d
Do not require time and fileutils by default
...
I have no idea what I'm doing, but the previous commit caused lots of CI
failures like 1496949568
and this
place is the most suspicious.
2020-12-03 21:24:36 -08:00
Takashi Kokubun
067f45ecd3
Save a core file on a worker crash
...
CI failures like
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3280458 doesn't
provide any useful information, and it doesn't leave a core file in a CI
environment because a test like `Process.kill(:TRAP, $$)` overwrites in
a next run very quickly.
Thus I'd like to keep core files in /tmp.
2020-12-03 21:01:25 -08:00
Takashi Kokubun
0734a6cd59
Revert "Report a full_message on a worker crash"
...
This reverts commit 00f046ef57
.
It was not helpful for an issue I was debugging.
2020-12-03 20:55:36 -08:00
Koichi Sasada
e79f1941b2
tune parallel test
...
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.
2020-12-01 09:39:09 +09:00
Takashi Kokubun
00f046ef57
Report a full_message on a worker crash
...
A worker crash happens very often, but we're not sure why.
I'd like to know a backtrace if it's available.
2020-11-24 20:36:39 -08:00
Koichi Sasada
7ad56fd87b
freeze dynamic regexp literals
...
Regexp literals are frozen, and also dynamically comppiled Regexp
literals (/#{expr}/) are frozen.
2020-10-27 01:45:57 +09:00
Hiroshi SHIBATA
533bca57e0
Expose assert, assert_respond_to and assert_not_respond_to for default gems.
2020-10-08 16:40:46 +09:00
Aaron Patterson
0767d387ec
Pass ASAN options to child environments
...
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-28 09:45:04 -07:00
Nobuyoshi Nakada
996af2ce08
Disable deprecation warning by the default [Feature #16345 ]
...
And `-w` option turns it on.
2020-09-25 09:50:33 +09:00
Nobuyoshi Nakada
9fbbbadc96
Added just working Test::Unit::CoreAssertions#diff
...
This is not "diff", but show expected and actual results both,
just to get rid of `NoMethodError` when an assertion failed.
2020-09-14 18:19:40 +09:00
Hiroshi SHIBATA
b194973dcd
Revert the related commits about Tempfile.open
change.
...
Start with fa21985a7a
to d7492a0be8
2020-09-09 21:10:48 +09:00
Benoit Daloze
e8c3872555
Simplify Tempfile.open calls with a block as they now unlink the file automatically
2020-08-29 12:23:23 +02:00
Nobuyoshi Nakada
2e7fe3b687
Add default color for each instance
2020-08-11 18:35:07 +09:00
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