summaryrefslogtreecommitdiff
path: root/tool/lib
AgeCommit message (Collapse)Author
2024-09-10Improve base time of assert_linear_performance (#11369)tomoya ishida
Remove `.ceil` from base time calculation that makes 10x gap. This will make the assertion more strict and also less flaky.
2024-09-10Added explicitly begin-end block for Ruby 2.4.Hiroshi SHIBATA
strscan, ipaddr and some default gems still support Ruby 2.4. After this, I extract this CoreAssertions to their repositories.
2024-09-10Suppress warning for shadowing outer local variableHiroshi SHIBATA
2024-09-10core_assertions.rb: Support old rubiesNobuyoshi Nakada
Some symbol argument might not be accepted by Process.clock_gettime.
2024-09-10core_assertions.rb: Prefer CPU time clocksNobuyoshi Nakada
To prevent influence from other processes.
2024-09-10core_assertions.rb: Extract common code blockNobuyoshi Nakada
2024-09-10core_assertions.rb: Tweak timeout limitNobuyoshi Nakada
Increase the timeout limit when variance at rehearsal is small.
2024-09-10Skip assert_linear_performance for RJITTakashi Kokubun
2024-06-19merge revision(s) ↵nagachika
9f708d48f6df37ee9600db9d51b57a156609a13b,0301473fb523c71d8cdc4966971f31f502001185,7f0e26b7f99bf76408569892ce20318501f74729: [Backport #20516] Clear runtime dependencies if default gems is specified. The current build system uses runtime dependencies from only `.bundle` directory. We shouldn't install runtime dependencies from rubygems.org when `make test-bundled-gems` is invoked. Fixed dependencies list format Re-use strscan with ruby repo
2023-03-29Added assert_linear_performance for URI testsHiroshi SHIBATA
2023-03-25merge revision(s) f229b36087f1b387d77af8f3fa50f9bffd2fd44e: [Backport #18989]nagachika
Fix test fail with assert_ractor outside of ruby/ruby repo Revert 806583c093ecc2d67830f0a8f0d94decf0ed71e5 --- tool/lib/core_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-10-24merge revision(s) c506ddac6c88b14daf4a18bddf1c1e57be8d2225:nagachika
Added assert_true and assert_false same as test-unit gem --- tool/lib/test/unit/assertions.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
2022-10-21merge revision(s) 44a0a66559ee4a03a84c27feca05e9b1b0f59df8:nagachika
Move to tool/lib/bundled_gem.rb --- common.mk | 6 +++--- defs/gmake.mk | 4 ++-- tool/gem-unpack.rb | 53 ----------------------------------------------- tool/lib/bundled_gem.rb | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 58 deletions(-) delete mode 100644 tool/gem-unpack.rb create mode 100644 tool/lib/bundled_gem.rb
2021-12-13Prepare for removing RubyVM::JIT (#5262)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2021-11-30Let pretty_inspect work once at firstNobuyoshi Nakada
For older pp.rb which did not need io/console, and dealing with `LoadError`.
2021-11-30Load io/console earlierNobuyoshi Nakada
Something goes wrong at loading libraries inside `mu_pp` in the test overriding `Class.inherited`.
2021-11-29Consider environment variable case-insensitivenessNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5188
2021-11-09Filter method names only if filtering method name onlyNobuyoshi Nakada
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.
2021-10-27Properly exclude test cases.Vít Ondruch
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]. Notes: Merged: https://github.com/ruby/ruby/pull/5026
2021-10-26Revert "introduce check code for mysterious EBADF"Koichi Sasada
This reverts commit 7864efa105921eb3900c843126f2e0db02b9c6ae.
2021-10-26Revert "check other IO#close calls"Koichi Sasada
This reverts commit a1c4cab11d613d7df037a81a770ee44a23a2e9be.
2021-10-25check other IO#close callsKoichi Sasada
http://ci.rvm.jp/results/trunk@ruby-iga/3690333 > tool/lib/test/unit/parallel.rb:68:in `close': Bad file descriptor (Errno::EBADF)
2021-10-25introduce check code for mysterious EBADFKoichi Sasada
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>' ```
2021-10-18Remove `Test::Unit::TestCase.make_my_diffs_pretty!`Nobuyoshi Nakada
`Test::Unit::CoreAssertions#mu_pp` is defined always using `pretty_inspect`. Notes: Merged: https://github.com/ruby/ruby/pull/4983
2021-10-18Remove `Test::Unit::Assertions#exception_details`Nobuyoshi Nakada
Never used since fa0f3eff228bb26de6d5b0e1238b1f358165dbd0. Notes: Merged: https://github.com/ruby/ruby/pull/4983
2021-10-17Retry hung up tests verboselyNobuyoshi Nakada
2021-10-17Retry hung tests after parallel runsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4976
2021-10-17Timeout parallel test worker processesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4976
2021-10-17Replace unpack with unpack1Nobuyoshi Nakada
2021-10-15Prefer `require_relative`Nobuyoshi Nakada
2021-10-15Use `__dir__`Nobuyoshi Nakada
2021-10-12[ruby/digest] jruby supportPavel Rosický
https://github.com/ruby/digest/commit/2e9dc14693
2021-10-10Run JIT tests first when random order instead of no-sortNobuyoshi Nakada
2021-10-10Default the test order to randomNobuyoshi Nakada
2021-10-09Refactor `Test::Unit::CoreAssertions#assert_nothing_raised`Nobuyoshi Nakada
* Separate exception classes to be rescued or reraised * Use the filtered backtrace in the failure message * Raise a new `AssertionFailedError` with the original backtrace
2021-10-09Exclude also core_assertions.rb from backtracesNobuyoshi Nakada
2021-10-09Unify `Test::Unit::Assertions#message`Nobuyoshi Nakada
Merge `Test::Unit::CoreAssertions#message`.
2021-10-09Let `Test::Unit::CoreAssertions::AllFailures#for` yield the keyNobuyoshi Nakada
Similar to `Test::Unit::CoreAssertions::AllFailures#foreach`.
2021-10-05Fix a typo since 688f2e1a893e04457a1a5aa3577b13f74b2bc080Nobuyoshi Nakada
2021-10-04Refactor ordering of testsNobuyoshi Nakada
* Split the sorting types into classes. * Apply the same sorting to method sorting under the parallel test. Notes: Merged: https://github.com/ruby/ruby/pull/4862
2021-09-17Prohibit test method redefinitionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4854
2021-09-13Use capture_output instead of capture_ioHiroshi SHIBATA
2021-09-13Rename capture_io to capture_output and deprecate to use capture_ioHiroshi SHIBATA
2021-09-13Removed unused mu_pp methodHiroshi SHIBATA
2021-09-13Renamed skip to pend and prepared to deprecate skip methodHiroshi SHIBATA
2021-09-13Add unique token to separated runnerNobuyoshi Nakada
Same as Test::Unit::CoreAssertions#assert_no_memory_leak.
2021-09-13Removed workaround for test_orderHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4828
2021-09-13Revert "Resolved conflict initializers"Hiroshi SHIBATA
This reverts commit 62db6e47b6c0fbba337649bfa468ec221d5d1001. 308183fffab43f1e111d5bb4c60f1380432966e6 is the correct solution about this.
2021-09-12Exclude option_parser from Test::Unit::Runner#inspectNobuyoshi Nakada
2021-09-12Prepend the modules in Test::UnitNobuyoshi Nakada
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.