Nobuyoshi Nakada
886202bac8
Count assertions in child processes
...
Fix up GH-15785.
2026-01-15 12:30:29 +09:00
Nobuyoshi Nakada
dd34d6273a
Extract git version only
...
The version message may contain other info such as the distribution.
e.g.:
```console
$ /usr/bin/git --version
git version 2.50.1 (Apple Git-155)
```
2026-01-02 13:13:40 +09:00
Nobuyoshi Nakada
d40e056cc8
Skip the hang-up test on Windows
2025-12-31 02:24:21 +09:00
Takashi Kokubun
f7120860b0
test_sync_default_gems.rb: Omit if git is v2.43 or older
2025-12-17 10:45:57 -08:00
Takashi Kokubun
dc2a62e14c
test_commit_email.rb: Ensure #teardown doesn't fail
...
if test is omitted.
Follow up c4e090def134f9b109991b74c027648564963763
2025-12-17 10:22:00 -08:00
Alan Wu
167c3dbaa0
Omit a test on s390x linux tripping over a git bug
...
This test has been reliably failing on recent trunk versions.
See: <https://github.com/ruby/ruby/actions/runs/19519712433/job/55880266450#step:14:120 >
2025-11-20 00:03:23 +00:00
Hiroshi SHIBATA
3d8dfbf51e
Skip TestCommitEmail if git is not available.
...
https://github.com/ruby/actions/actions/runs/19420968008/job/55558315338
```
1) Error:
TestCommitEmail#test_sendmail_encoding:
Test::Unit::ProxyError: No such file or directory - git
/home/runner/work/actions/actions/ruby-4.0.0-preview2/lib/open3.rb:534:in 'Kernel#spawn'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/lib/open3.rb:534:in 'Open3.popen_run'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/lib/open3.rb:379:in 'Open3.popen2'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/lib/open3.rb:785:in 'Open3.capture2'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/tool/test/test_commit_email.rb:89:in 'TestCommitEmail#git'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/tool/test/test_commit_email.rb:13:in 'block in TestCommitEmail#setup'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/tool/test/test_commit_email.rb:12:in 'Dir.chdir'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/tool/test/test_commit_email.rb:12:in 'TestCommitEmail#setup'
2) Error:
TestCommitEmail#test_sendmail_encoding:
Test::Unit::ProxyError: no implicit conversion of nil into String
/home/runner/work/actions/actions/ruby-4.0.0-preview2/tool/test/test_commit_email.rb:37:in 'File.unlink'
/home/runner/work/actions/actions/ruby-4.0.0-preview2/tool/test/test_commit_email.rb:37:in 'TestCommitEmail#teardown'
```
2025-11-17 16:08:31 +09:00
Nobuyoshi Nakada
4a1b88afb8
Exclude lib/unicode_normalize from lib/un
2025-11-13 21:27:53 +09:00
Kazuhiro NISHIYAMA
b4b7809f0b
Use path in tmpdir instead of IO::NULL
...
The path already used in tool/test/test_sync_default_gems.rb .
Try to fix errors on Windows.
https://github.com/ruby/ruby/actions/runs/19316448613/job/55248700110
2025-11-13 13:34:33 +09:00
Kazuhiro NISHIYAMA
37a05b591c
Ignore ~/.gitconfig
...
I use `commit.gpgsign=true`, so I want to ignore it in tests.
2025-11-13 09:34:08 +09:00
Kazuki Yamaguchi
f979ef1fb3
sync_default_gems.rb: gracefully handle merge commits
...
Find interesting commits by following parents instead of relying on
"git log".
If we encounter a merge commit that may contain a conflict resolution,
fall back to cherry-picking the merge commit as a whole rather than
replaying each individual commit. The sync commit will include a
shortlog for the squashed commits in that case.
2025-11-05 15:01:16 +09:00
Kazuki Yamaguchi
b722631b48
sync_default_gems.rb: use declarative mapping rules
...
No behavior change is intended by this change.
2025-11-05 15:01:16 +09:00
Kazuki Yamaguchi
348adb8fb4
sync_default_gems.rb: simplify rewriting commit message
...
Use "git commit --amend" instead of "git filter-branch" since we only
need to handle one commit at HEAD.
2025-11-05 15:01:16 +09:00
Nobuyoshi Nakada
c4e090def1
test_commit_email.rb: Clean up temporary files
2025-10-29 10:06:02 +09:00
Nobuyoshi Nakada
fa883a4de8
test_commit_email.rb: Simply use sh
...
`env` on macOS resets DYLD environment variables that are needed to
run ruby configured with `--enable-load-relative`. Use simple
commands instead, and `/bin/sh` that is specified in POSIX is more
portable than `/usr/bin/env`.
2025-10-11 11:01:56 +09:00
Takashi Kokubun
a59c5860a6
test_commit_email.rb: Split out as binary for --with-gmp
...
https://github.com/ruby/ruby/actions/runs/18365998053/job/52318906076
2025-10-08 22:30:43 -07:00
Takashi Kokubun
f012543989
test_commit_email.rb: Stop testing the un-encoded name
...
Hoping to work around failures on --with-gmp CI:
https://github.com/ruby/ruby/actions/runs/18365603616/job/52317792903
2025-10-08 21:59:03 -07:00
Takashi Kokubun
127318f4cb
test_commit_email.rb: Test the encoding of commit messages
2025-10-08 21:40:40 -07:00
Takashi Kokubun
cd8a4406c1
test_commit_email.rb: Skip the sendmail test on Windows
...
We use only ubuntu-latest on post_push.yml anyway.
2025-10-08 21:32:56 -07:00
Takashi Kokubun
a21cde942c
test_commit_email.rb: Fix the timezone for commit-email.rb
...
as well
2025-10-08 21:31:05 -07:00
Takashi Kokubun
f8c841dbd5
test_commit_email.rb: Use a fixed timezone
2025-10-08 21:26:54 -07:00
Takashi Kokubun
53d1731b68
commit-email.rb: Remove legacy SVN headers
2025-10-08 21:22:35 -07:00
Takashi Kokubun
08b34bf909
test_commit_email.rb: Remove an unused local variable
2025-10-08 21:16:03 -07:00
Takashi Kokubun
438ea7d69e
test_commit_email.rb: Test the content of an email
2025-10-08 21:09:49 -07:00
Takashi Kokubun
6922e969f1
Allow test-tool to use bundled gems in child processes ( #14794 )
2025-10-08 21:07:11 -07:00
Takashi Kokubun
77b62a8292
Revert "commit-email.rb: Use base64 instead of nkf"
...
This reverts commit dbb5972b340f24d9ff4f3996f57439d5a6b3454e.
It didn't work, sorry.
2025-10-08 17:03:17 -07:00
Takashi Kokubun
dbb5972b34
commit-email.rb: Use base64 instead of nkf
...
which makes it more obvious what it's doing.
2025-10-08 16:32:10 -07:00
Takashi Kokubun
afb21f3498
test_commit_email.rb: Stop printing LoadError
...
on a require attempt
2025-10-08 16:23:53 -07:00
Takashi Kokubun
0508786b73
Migrate a test for commit-email.rb ( #14784 )
...
from 2c4628e489 .
Also drop ostruct from dependencies. We could remove nkf if we use
base64, but it's also a bundled gem, so it doesn't really help.
2025-10-08 16:16:02 -07:00
Alan Wu
7ed1b24bf3
Unset RUBY_CRASH_REPORT in tests that crash on purpose
2025-09-17 13:35:35 -04:00
Nobuyoshi Nakada
e92543e76c
Skip TestSyncWithCommits on other than particular platforms
...
No one uses `sync_default_gems_with` on other platforms; it is used by
the dedicated workflow and a few developers only.
2025-09-17 14:34:58 +09:00
Nobuyoshi Nakada
13a57c9c35
sync_default_gems.rb: Set git configurations for EOL code of logs
2025-09-17 11:23:17 +09:00
Nobuyoshi Nakada
85bd3fb870
sync_default_gems.rb: Support log.showSignature case
2025-09-07 10:41:32 +09:00
Nobuyoshi Nakada
b066260296
Follow up testunit
...
* Update method names.
* Sort shuffled tests by names.
2025-06-18 01:46:58 +09:00
Nobuyoshi Nakada
1a527929a5
Revert "Temporary pend unknown behavior of parallel tests"
...
This reverts commit 980f61935f6e8331e0908dc963e60fb727ab4d8c, which
seems no longer needed.
2025-06-18 01:46:58 +09:00
Yusuke Endoh
fc26004660
Remove test_retry_workers
...
The test fails randomly for unknown reason.
https://github.com/ruby/ruby/actions/runs/14121674932/job/39562945096?pr=12993
```
1) Error:
TestParallel::TestParallel#test_retry_workers:
Test::Unit::ProxyError: execution expired (start: 2025-03-28 04:04:10 +0000, end: 2025-03-28 04:05:50 +0000)
/home/runner/work/ruby/ruby/src/tool/test/testunit/test_parallel.rb:16:in 'TestParallel.timeout'
/home/runner/work/ruby/ruby/src/tool/test/testunit/test_parallel.rb:225:in 'TestParallel::TestParallel#test_retry_workers'
```
Maybe the workers do not respond "quit" request.
We no longer use the retry mechanism, so just remove the test.
2025-03-28 14:19:33 +09:00
Yusuke Endoh
28c7ae6626
Try avoiding "invalid byte sequence in UTF-8"
2025-03-28 14:19:33 +09:00
Yusuke Endoh
12f8dda9e0
Report the actual time wated for timeout errors in TestParallel
2025-03-28 14:19:33 +09:00
Naoto Ono
2dff416ff2
Increase timeout in TestParallel testing to reduce flaky failures ( #12822 )
...
Currently, the following tests are flaky and failing intermittently, so I'm going to increase the timeout to improve stability.
```
1) Failure:
TestParallel::TestParallel#test_hungup [/Users/runner/work/ruby/ruby/src/tool/lib/zombie_hunter.rb:6]:
Expected [[42009, #<Process::Status: pid 42009 SIGKILL (signal 9)>]] to be empty.
2) Error:
TestParallel::TestParallel#test_hungup:
Test::Unit::ProxyError: execution expired
/Users/runner/work/ruby/ruby/src/lib/timeout.rb:40:in 'Timeout::Error.handle_timeout'
/Users/runner/work/ruby/ruby/src/lib/timeout.rb:194:in 'Timeout.timeout'
/Users/runner/work/ruby/ruby/src/tool/test/testunit/test_parallel.rb:210:in 'TestParallel::TestParallel#test_hungup'
```
https://github.com/ruby/ruby/actions/runs/13560087551/job/37901506230#step:14:105
```
1) Error:
TestParallel::TestParallel#test_retry_workers:
Test::Unit::ProxyError: execution expired
/Users/runner/work/ruby/ruby/src/lib/timeout.rb:40:in 'Timeout::Error.handle_timeout'
/Users/runner/work/ruby/ruby/src/lib/timeout.rb:194:in 'Timeout.timeout'
/Users/runner/work/ruby/ruby/src/tool/test/testunit/test_parallel.rb:217:in 'TestParallel::TestParallel#test_retry_workers'
```
https://github.com/ruby/ruby/actions/runs/13559151505/job/37899041580#step:14:106
2025-02-27 07:55:54 +00:00
Naoto Ono
48b6c60969
[Misc #20661 ] Stop retrying tests in make test-all command by default ( #11271 )
...
[Misc #20661 ] Stop retrying tests in make test-all command by default
2025-02-27 06:12:02 +00:00
Nobuyoshi Nakada
4a67ef09cc
[Feature #21116 ] Extract RJIT as a third-party gem
2025-02-13 18:01:03 +09:00
Nobuyoshi Nakada
c51668d249
Add Test::Unit::CoreAssertions#assert_raise_kind_of
...
Similar to `Test::Unit::assert_raise`, but allows sub classes too.
2025-01-24 15:51:28 +09:00
Nobuyoshi Nakada
ae94fca788
Add test for Test::Unit::CoreAssertions#assert_raise_with_message
2025-01-24 15:53:08 +09:00
Peter Zhu
7eeabccf4c
Fix TestParallel#test_hungup when RUBY_TEST_TIMEOUT_SCALE is set
...
When RUBY_TEST_TIMEOUT_SCALE is set, the timeout increases by the multiple
specified. However, the test in test4test_hungup.rb does not scale, so
if RUBY_TEST_TIMEOUT_SCALE is a large number like 10, then the test will
not time out causing the tests test to fail.
2024-10-29 15:34:58 +09:00
Nobuyoshi Nakada
fcb058309b
Accept version range
...
Single `Integer` argument means an exact match to the major version.
2024-09-12 23:47:34 +09:00
Yusuke Endoh
062f85e141
Dump all-thread backtraces when test parallel worker exceeds time limit
2024-08-06 21:11:41 +09:00
Hiroshi SHIBATA
9a5e3a4007
Removed WEBrick and that tests
...
We can handle uri, time and others without `make test-all` dependencies now.
2024-07-11 09:23:16 +09:00
Naoto Ono
8ede84aa95
Move the file location of launchable.rb
2024-07-08 10:15:04 +09:00
Naoto Ono
5b78925455
Integrate Launchable into make btest
2024-07-08 10:15:04 +09:00
Nobuyoshi Nakada
aabe718e64
Show the caller location of assertion methods
...
Not only defined in `Test::Unit` or `CoreAssertions`, also show the
caller location of assertion methods defined in the current class or
ancestors.
2024-05-08 17:24:36 +09:00