summaryrefslogtreecommitdiff
path: root/tool/lib/test/unit.rb
AgeCommit message (Collapse)Author
2022-01-26add `--stderr-on-failure` option to test-allKoichi Sasada
Now all failure messages are printed to stdout. This option makes all failure messages printed into stderr. Notes: Merged: https://github.com/ruby/ruby/pull/5483
2021-12-13Prepare for removing RubyVM::JIT (#5262)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
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-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-10Run JIT tests first when random order instead of no-sortNobuyoshi Nakada
2021-10-10Default the test order to randomNobuyoshi Nakada
2021-10-09Exclude also core_assertions.rb from backtracesNobuyoshi Nakada
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-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.
2021-09-11Update comments for minitestNobuyoshi Nakada
2021-09-11Update an option messageNobuyoshi Nakada
2021-09-11Directly alias orig_run_suiteNobuyoshi Nakada
2021-09-11Remove method filter hack for minitestNobuyoshi Nakada
2021-09-11Replace minitest to test for backtrace_filterHiroshi SHIBATA
2021-09-11Replace Test::Assertion and Test::Skip to Test::Unit::AssertionFailedError ↵Hiroshi SHIBATA
and Test::Unit::PendedError Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Removed needless requireHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Removed obsoleted constantHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Integrate Minitest to TestHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Use prepend for override to status lineHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Removed duplicated autorun methodHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Resolved conflict initializersHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Removed unused _run_suitesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Removed deprecated process_argsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Merge poke methodsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Merge run methodsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Removed VERSION constantHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Replace MiniTest::Unit to Test::Unit::RunnerHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Move MiniTest::Unit to under Test::Unit::RunnerHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Fixed broken runner for `make test-all`Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Move test_order under the Test::Unit::TestCaseHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-08-29Handle non-succeeding reports mingled with dotsNobuyoshi Nakada
2021-06-24test: imply random test order by --seed optionNobuyoshi Nakada
2021-05-28Use require_relative to use Minitest library for testing.Hiroshi SHIBATA
There is no reason to care for minitest gem.
2021-02-14Set verbose flag at retryingNobuyoshi Nakada
2020-12-13Debug the command used for gdb dumpTakashi Kokubun
It's not working http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/3288206. I'm debugging why.
2020-12-12Dump a backtrace with gdbTakashi Kokubun
Because Ruby often fails to dump a C backtrace.
2020-12-03Avoid leaving too many core files in /tmpTakashi Kokubun
for CIs like ci.rvm.jp.
2020-12-03Do not require time and fileutils by defaultTakashi Kokubun
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-03Save a core file on a worker crashTakashi Kokubun
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-03Revert "Report a full_message on a worker crash"Takashi Kokubun
This reverts commit 00f046ef57f9da7f5248f9ef9d55702ddc407bf1. It was not helpful for an issue I was debugging.
2020-12-01tune parallel testKoichi Sasada
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. Notes: Merged: https://github.com/ruby/ruby/pull/3826