summaryrefslogtreecommitdiff
path: root/tool/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix parallel test timeout retryingKoichi Sasada2022-02-161-1/+13
| | | | | | | | | On the parallel test, workers can be killed because of timeout and the information for the retrying can be inconsistent. This patch will skip if the inconsistency is found and report as an error. http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082
* [ruby/logger] Fix log rotation inter-process lock failed.Jesse Chavez2022-01-271-1/+1
| | | | | | | | | | | | Issue only occurs in JRuby 9.3.0.0 and Windows and the full console output is: log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process. log writing failed. closed stream log writing failed. closed stream ... https://github.com/ruby/logger/commit/19fc734638
* add `--stderr-on-failure` option to test-allKoichi Sasada2022-01-261-1/+7
| | | | | Now all failure messages are printed to stdout. This option makes all failure messages printed into stderr.
* [ruby/pathname] Officially drop support for ruby 2.6 or olderDavid Rodríguez2022-01-251-1/+1
| | | | | | | | | | | | | | | | | The gem doesn't even install on old rubies, but since the gemspec claims it's supported, `gem install pathname` will try to install it and print an error. This commit doesn't fix the above issue. The only way to fix it would be to restore support and release a new version that actually supports old rubies. However, such a change has been proposed and ignored for a long time. So this issue proposes to leave that broken but at least bring the gemspec manifest and the CI matrix in sync to hopefully avoid this issue from happening again in the future. https://github.com/ruby/pathname/commit/3ee010b538
* remain `RUBY_ON_BUG` for child processes.Koichi Sasada2022-01-191-1/+6
| | | | | `RUBY_ON_BUG` is useful for child processes created by the test process.
* Removed skip alias in test suiteHiroshi SHIBATA2022-01-171-5/+3
|
* Prepare for removing RubyVM::JIT (#5262)Takashi Kokubun2021-12-132-2/+2
|
* Let pretty_inspect work once at firstNobuyoshi Nakada2021-11-301-1/+1
| | | | | For older pp.rb which did not need io/console, and dealing with `LoadError`.
* Load io/console earlierNobuyoshi Nakada2021-11-301-0/+1
| | | | | Something goes wrong at loading libraries inside `mu_pp` in the test overriding `Class.inherited`.
* Consider environment variable case-insensitivenessNobuyoshi Nakada2021-11-291-3/+18
|
* Filter method names only if filtering method name onlyNobuyoshi Nakada2021-11-091-9/+6
| | | | | | | If sole `filter` option doesn't seem including test case name, match with method name only. And if the filter is a Regexp or String, it never matches method name symbols.
* Properly exclude test cases.Vít Ondruch2021-10-271-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lets consider the following scenario: ~~~ irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):001:0> p suite OpenSSL::TestEC => OpenSSL::TestEC irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):002:0> p all_test_methods ["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"] => ["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"] irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):003:0> p filter /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/ => /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/ irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):004:0> method = "test_check_key" => "test_check_key" ~~~ The intention here is to exclude the `test_check_key` test case. Unfortunately this does not work as expected, because the negative filter is never checked: ~~~ irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):005:0> filter === method => true irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):006:0> filter === "#{suite}##{method}" => false irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):007:0> filter === method || filter === "#{suite}##{method}" => true ~~~ Therefore always filter against the fully qualified method name `#{suite}##{method}`, which should provide the expected result. However, if plain string filter is used, keep checking also only the method name. This resolves [Bug #16936].
* Revert "introduce check code for mysterious EBADF"Koichi Sasada2021-10-261-15/+2
| | | | This reverts commit 7864efa105921eb3900c843126f2e0db02b9c6ae.
* Revert "check other IO#close calls"Koichi Sasada2021-10-261-20/+17
| | | | This reverts commit a1c4cab11d613d7df037a81a770ee44a23a2e9be.
* check other IO#close callsKoichi Sasada2021-10-251-17/+20
| | | | | http://ci.rvm.jp/results/trunk@ruby-iga/3690333 > tool/lib/test/unit/parallel.rb:68:in `close': Bad file descriptor (Errno::EBADF)
* introduce check code for mysterious EBADFKoichi Sasada2021-10-251-2/+15
| | | | | | | | | | | | | | | | | | parallel test randomly failed with EBADF. This patch checks wich suite causes this error. ex) http://ci.rvm.jp/results/trunk@ruby-iga/3690219 ``` /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:88:in `close': Bad file descriptor (Errno::EBADF) /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:88:in `ensure in _run_suite' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:89:in `_run_suite' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:30:in `block in _run_suites' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:29:in `map' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:29:in `_run_suites' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:128:in `run' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:211:in `<main>' ```
* Remove `Test::Unit::TestCase.make_my_diffs_pretty!`Nobuyoshi Nakada2021-10-181-14/+0
| | | | | `Test::Unit::CoreAssertions#mu_pp` is defined always using `pretty_inspect`.
* Remove `Test::Unit::Assertions#exception_details`Nobuyoshi Nakada2021-10-181-14/+0
| | | | Never used since fa0f3eff228bb26de6d5b0e1238b1f358165dbd0.
* Retry hung up tests verboselyNobuyoshi Nakada2021-10-171-3/+12
|
* Retry hung tests after parallel runsNobuyoshi Nakada2021-10-172-16/+58
|
* Timeout parallel test worker processesNobuyoshi Nakada2021-10-171-5/+27
|
* Replace unpack with unpack1Nobuyoshi Nakada2021-10-172-8/+8
|
* Prefer `require_relative`Nobuyoshi Nakada2021-10-153-11/+11
|
* Use `__dir__`Nobuyoshi Nakada2021-10-151-1/+1
|
* [ruby/digest] jruby supportPavel Rosický2021-10-121-0/+1
| | | | https://github.com/ruby/digest/commit/2e9dc14693
* Run JIT tests first when random order instead of no-sortNobuyoshi Nakada2021-10-101-4/+10
|
* Default the test order to randomNobuyoshi Nakada2021-10-101-1/+1
|
* Refactor `Test::Unit::CoreAssertions#assert_nothing_raised`Nobuyoshi Nakada2021-10-091-20/+8
| | | | | | * Separate exception classes to be rescued or reraised * Use the filtered backtrace in the failure message * Raise a new `AssertionFailedError` with the original backtrace
* Exclude also core_assertions.rb from backtracesNobuyoshi Nakada2021-10-091-2/+3
|
* Unify `Test::Unit::Assertions#message`Nobuyoshi Nakada2021-10-091-21/+10
| | | | Merge `Test::Unit::CoreAssertions#message`.
* Let `Test::Unit::CoreAssertions::AllFailures#for` yield the keyNobuyoshi Nakada2021-10-091-1/+1
| | | | Similar to `Test::Unit::CoreAssertions::AllFailures#foreach`.
* Fix a typo since 688f2e1a893e04457a1a5aa3577b13f74b2bc080Nobuyoshi Nakada2021-10-051-1/+1
|
* Refactor ordering of testsNobuyoshi Nakada2021-10-042-57/+96
| | | | | | * Split the sorting types into classes. * Apply the same sorting to method sorting under the parallel test.
* Prohibit test method redefinitionNobuyoshi Nakada2021-09-171-1/+1
|
* Use capture_output instead of capture_ioHiroshi SHIBATA2021-09-131-1/+1
|
* Rename capture_io to capture_output and deprecate to use capture_ioHiroshi SHIBATA2021-09-131-7/+6
|
* Removed unused mu_pp methodHiroshi SHIBATA2021-09-131-11/+0
|
* Renamed skip to pend and prepared to deprecate skip methodHiroshi SHIBATA2021-09-131-5/+7
|
* Add unique token to separated runnerNobuyoshi Nakada2021-09-131-8/+12
| | | | Same as Test::Unit::CoreAssertions#assert_no_memory_leak.
* Removed workaround for test_orderHiroshi SHIBATA2021-09-131-13/+8
|
* Revert "Resolved conflict initializers"Hiroshi SHIBATA2021-09-131-6/+13
| | | | | | | This reverts commit 62db6e47b6c0fbba337649bfa468ec221d5d1001. 308183fffab43f1e111d5bb4c60f1380432966e6 is the correct solution about this.
* Exclude option_parser from Test::Unit::Runner#inspectNobuyoshi Nakada2021-09-121-0/+8
|
* Prepend the modules in Test::UnitNobuyoshi Nakada2021-09-121-11/+11
| | | | | | | Needs to override Test::Unit::Runner#run, so that RunCount#run runs which increments @@run_count. Previously it worked because these methods were inserted between Test::Unit::Runner#run and MiniTest::Unit#run.
* Removed unsed assertions for rubygemsHiroshi SHIBATA2021-09-111-43/+0
|
* Removed unused alias for run_testHiroshi SHIBATA2021-09-111-10/+8
|
* Removed rubinius support from test suiteHiroshi SHIBATA2021-09-111-7/+0
|
* Removed maglev related code because it's not active status nowHiroshi SHIBATA2021-09-111-9/+0
|
* Update comments for minitestNobuyoshi Nakada2021-09-112-15/+7
|
* Update an option messageNobuyoshi Nakada2021-09-111-1/+1
|
* Directly alias orig_run_suiteNobuyoshi Nakada2021-09-112-2/+1
|