Hiroshi SHIBATA
1bec4f251d
Move MiniTest::Assertions to Test::Unit::Assertions
2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA
ecfbf1df33
Use Test::Unit::PendedError instead of MiniTest::Skip for test-unit migration
2021-09-06 19:33:56 +09:00
Hiroshi SHIBATA
544e37f184
Simplify conditions for CoreAssertion initialization
2021-09-06 19:31:24 +09:00
Nobuyoshi Nakada
3a145066a6
Expand upstream issue numbers to URLs in ChangeLog
2021-09-04 00:26:39 +09:00
Nobuyoshi Nakada
af68112a1b
Add some punctuations as regexp separators to fix commit logs
2021-09-03 23:46:33 +09:00
Nobuyoshi Nakada
265a725830
Handle non-succeeding reports mingled with dots
2021-08-29 16:32:55 +09:00
Nobuyoshi Nakada
6c40aa35a5
Memory::Status#_update should return `self`
2021-08-29 16:32:12 +09:00
Nobuyoshi Nakada
ae275f67ce
Show WorkingSetSize as RSS on Windows
2021-08-05 17:14:38 +09:00
Koichi Sasada
228b3e43be
check GC.enable'd status
...
Check GC.enable'd status before and after test execution.
Write this checker in gc_checker.rb, it was renamed from
gc_compact_checker.rb.
2021-08-05 17:11:50 +09:00
Nobuyoshi Nakada
3bb6410914
Use equivalent `__FILE__`
2021-08-05 14:15:30 +09:00
Nobuyoshi Nakada
5f2987d6c2
Fix relative paths from core_assertions.rb
2021-08-04 20:39:12 +09:00
Nobuyoshi Nakada
1f2b3f2529
Remove an extraneous escape
...
Since a3fb97465d
, this string is not inside the here-document.
2021-08-04 16:59:18 +09:00
Nobuyoshi Nakada
b8386f7f7f
Prepend DebugSystem to VCS class only
...
And revert 24e5f1c982
, pepending to
Kernel did not affect the top level methods before 3.0.
2021-07-26 15:44:40 +09:00
Nobuyoshi Nakada
690385014a
Move core_assertions.rb from test/unit
...
This file contains extended assertions for ruby core which do not
belong to test/unit.
2021-07-11 19:56:53 +09:00
Nobuyoshi Nakada
afd4cfcf22
Try "so" attribute if "smso" is not found
2021-07-06 21:02:40 +09:00
Nobuyoshi Nakada
e724857f42
Show leaked file descriptors only, without cwd, txt, and so on
2021-06-27 21:17:58 +09:00
Nobuyoshi Nakada
3839a8fe79
Narrow the tracing of object allocations to during each test
2021-06-27 21:13:51 +09:00
Nobuyoshi Nakada
fb978fab6d
Tests for MiniTest define anonymous test cases
2021-06-24 20:39:52 +09:00
Nobuyoshi Nakada
e1c3cb9357
test: imply random test order by --seed option
2021-06-24 18:52:35 +09:00
Hiroshi SHIBATA
6e7e9a80ad
Expose assert_all? for ruby/csv repo
2021-06-01 19:38:05 +09:00
Hiroshi SHIBATA
ded7dd9ccc
Use require_relative to use Minitest library for testing.
...
There is no reason to care for minitest gem.
2021-05-28 11:38:37 +09:00
Hiroshi SHIBATA
adcbae8d49
Removed minitest/mock
2021-05-19 14:24:01 +09:00
Hiroshi SHIBATA
9bd79c2cef
Removed minitest/benchmark
2021-05-18 17:31:43 +09:00
Hiroshi SHIBATA
5a0b89de32
Removed minitest/autorun
2021-05-18 17:31:42 +09:00
Yusuke Endoh
5f8bca3257
tool/lib/minitest/mock.rb: define Object#stub only when not defined
...
Recently, lib/rubygems/test_case.rb also defines the method.
2021-05-14 18:10:07 +09:00
Hiroshi SHIBATA
010bb0883e
Workaround for make test-tool
2021-05-11 20:08:03 +09:00
Yusuke Endoh
bb8a759f6b
Fix a typo of c6a11b865e
...
It failed to define `refute_path_not_exist`
2021-05-11 19:46:15 +09:00
Hiroshi SHIBATA
c6a11b865e
Alias assert/refute_path_exists for test-unit gem.
...
It's required at https://github.com/rubygems/rubygems/pull/3141
2021-05-11 19:32:35 +09:00
Nobuyoshi Nakada
07ff1f4b0b
Revert "Extracted AtomicWrite"
...
This reverts commit 2148ee78a5
, mistakenly committed.
2021-03-13 09:14:20 +09:00
Nobuyoshi Nakada
2148ee78a5
Extracted AtomicWrite
2021-03-13 09:10:45 +09:00
Nobuyoshi Nakada
0d29c3179c
[ruby/stringio] Include all modules included into Test::Unit::TestCase
...
Some methods are separated into modules in test-unit now.
https://github.com/ruby/stringio/commit/d289848994
2021-03-08 09:35:46 +09:00
Nobuyoshi Nakada
21e255913c
[ruby/stringio] Pass IOs as separate list for ruby 2.x
...
https://github.com/ruby/stringio/commit/74e39858eb
2021-03-08 09:35:25 +09:00
Nobuyoshi Nakada
416956afa6
Set verbose flag at retrying
2021-02-14 17:47:46 +09:00
Nobuyoshi Nakada
dfff1df95c
vcs.rb: update the given option to VCS.detect by keyword arguments
2021-02-08 23:56:19 +09:00
Nobuyoshi Nakada
a0faad38ce
vcs.rb: added `base_url` keyword option to GIT#export_changelog
2021-02-08 23:56:01 +09:00
Nobuyoshi Nakada
ced09d521c
vcs.rb: improved export_changelog
...
* arguments are optional
* `path` may be passed as a keyword argument
* `nil` or `"-"` path means stdout
2021-02-08 23:45:51 +09:00
Nobuyoshi Nakada
1e2a8f7c94
vcs.rb: fix for baseruby 2.2
2021-01-26 10:30:29 +09:00
Nobuyoshi Nakada
6963e682f8
vcs.rb: support `d` command in log-fix
2021-01-26 10:04:12 +09:00
Nobuyoshi Nakada
a56760b908
vcs.rb: allow log-fix to insert an empty line
2021-01-26 09:58:11 +09:00
Nobuyoshi Nakada
6ef761a515
vcs.rb: continue just with warning if failed to fetch notes
2021-01-23 10:07:49 +09:00
Nobuyoshi Nakada
ccd7b7ab9a
vcs.rb: include commit info in ChangeLog
2021-01-23 10:07:49 +09:00
Nobuyoshi Nakada
3b631d0f73
Support `i` command in log-fix
2021-01-21 01:03:01 +09:00
Takashi Kokubun
e1fee7f949
Rename RubyVM::MJIT to RubyVM::JIT
...
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.
[Feature #17490 ]
2021-01-13 22:46:51 -08:00
Nobuyoshi Nakada
590dc06e38
Get rid of defining methods for tests in core classes
...
Not to interfere in other tests.
2021-01-09 22:38:06 +09:00
Nobuyoshi Nakada
ddacff2b41
Follow up on variations of the development start messages [ci skip]
2020-12-25 17:43:23 +09:00
Nobuyoshi Nakada
fb54574393
Pass keyword options in assert_syntax_error
2020-12-24 01:24:30 +09:00
Kenta Murata
aa856d5077
[ruby/date] Fix envutil for old Ruby
...
https://github.com/ruby/date/commit/57e25c406a
2020-12-23 18:19:26 +09:00
Hiroshi SHIBATA
61bd28b836
[ruby/date] Workaround for non-ruby repository like ruby/date, flori/json
...
https://github.com/ruby/date/commit/1ff7fa2d80
2020-12-23 13:53:40 +09:00
Hiroshi SHIBATA
f14aaa2b12
Guard < Ruby 3.0 for the repositories of default gems.
2020-12-23 13:44:47 +09:00
Marc-Andre Lafortune
1ecac8e4d0
Add `require_relative` option to `assert_ractor`
2020-12-20 22:00:05 -05:00
Marc-Andre Lafortune
b1b6dbfdc3
`assert_ractor` tweak. Thanks Nobu
2020-12-19 22:37:27 -05:00
Marc-Andre Lafortune
70f20234b2
Add `assert_ractor` [Feature #17367 ]
2020-12-19 17:13:08 -05:00
Jeremy Evans
05313c914b
Use category: :deprecated in warnings that are related to deprecation
...
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
2020-12-18 09:54:11 -08:00
Nobuyoshi Nakada
9908177857
test/ruby: Check warning messages at a finer granularity
...
Instead of suppressing all warnings wholly in each test scripts by
setting `$VERBOSE` to `nil` in `setup` methods.
2020-12-17 20:06:18 +09:00
Takashi Kokubun
aacd2295d0
Debug the command used for gdb dump
...
It's not working
http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206 . I'm
debugging why.
2020-12-13 23:35:29 -08:00
Takashi Kokubun
246d7e4f1d
Dump a backtrace with gdb
...
Because Ruby often fails to dump a C backtrace.
2020-12-12 18:46:24 -08:00
Hiroshi SHIBATA
a6a68bae3c
Removed needless gemspec of webrick
2020-12-11 14:16:42 +09:00
Hiroshi SHIBATA
947a5505e5
Bump webrick-1.7.0 for version management with ruby/webrick.
2020-12-11 14:16:42 +09:00
Hiroshi SHIBATA
5dc786bf86
Move webrick library into internal test toolchain
2020-12-10 18:06:25 +09:00
Takashi Kokubun
f1757a88a4
Avoid leaving too many core files in /tmp
...
for CIs like ci.rvm.jp.
2020-12-03 21:33:35 -08:00
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 https://github.com/ruby/ruby/runs/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.
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-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