Commit graph

512 commits

Author SHA1 Message Date
Naoto Ono
5b78925455 Integrate Launchable into make btest 2024-07-08 10:15:04 +09:00
Alan Wu
0dcb0fdfcd
Enable LeakChecker for RJIT previously disabled for MJIT (#10998)
RJIT doesn't spawn subprocesses so there should now be no need to
special case it.
2024-06-14 00:05:38 -07:00
Hiroshi SHIBATA
7f0e26b7f9 Re-use strscan with ruby repo 2024-05-20 18:10:09 +09:00
Nobuyoshi Nakada
e937878883
Revert "Update revision.h if branch unmatch not only revision"
This reverts commit 5a332940ed.
Something does not work well on Github Actions.
2024-05-09 01:02:59 +09:00
Nobuyoshi Nakada
5a332940ed
Update revision.h if branch unmatch not only revision [ci skip] 2024-05-08 21:39:32 +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
Kevin Newton
b4b39a6199 [PRISM] Enable test_methoddef_endless_command 2024-05-07 14:24:31 -04:00
Nobuyoshi Nakada
a53435868e
Traverse tmpdir under chdir 2024-04-23 13:38:40 +09:00
Nobuyoshi Nakada
777daae049
Shorten tmpdir path 2024-04-23 13:38:39 +09:00
Nobuyoshi Nakada
d42a8d6602
[DOC] Tweek a comment 2024-04-22 13:00:19 +09:00
Nobuyoshi Nakada
44d2b59491
Extract list_tree as a method and separate from removals 2024-04-22 13:00:19 +09:00
Nobuyoshi Nakada
c65bc2e5d9
Show left tmpdir recursively 2024-04-22 13:00:19 +09:00
Nobuyoshi Nakada
e59da9c339
Windows does not have "/tmp" path usually 2024-04-22 09:56:47 +09:00
Nobuyoshi Nakada
9f9755664d
Fix method name 2024-04-20 11:34:52 +09:00
Nobuyoshi Nakada
cd95f6b87f
Show left files info 2024-04-19 23:17:23 +09:00
Nobuyoshi Nakada
c789e4c493
Use isolated temporary directory in test-all too for RubyGems tests 2024-04-19 23:06:46 +09:00
Nobuyoshi Nakada
05d681f91e
Make Output.new accepts keyword arguments 2024-04-19 14:12:42 +09:00
Naoto Ono
56ecd8038a Launchable: Add lineNumber field 2024-04-03 16:17:30 +09:00
Naoto Ono
3d1d1435c1 Launchable: Refactor the logic of JsonStreamWriter 2024-04-02 21:55:32 +09:00
Hiroshi SHIBATA
7630a89a4b Use www.rfc-editor.org for RFC text.
We use the following site for that now:

* https://tools.ietf.org/ or http
* https://datatracker.ietf.org or http

Today, IETF said the official site of RFC is www.rfc-editor.org.

FYI: https://authors.ietf.org/en/references-in-rfcxml

I replaced them to www.rfc-editor.org.
2024-03-28 11:44:45 +09:00
Nobuyoshi Nakada
6ccc04cf45
Add more abstract decorations for messaging 2024-03-18 23:29:53 +09:00
Nobuyoshi Nakada
1ad366134d
[Feature #20293] Add Warning.categories 2024-03-14 17:56:55 +09:00
Hiroshi SHIBATA
874e9fc34d Don't need to remove ruby2_keywords dependency from drb 2024-03-01 12:32:40 +09:00
Nobuyoshi Nakada
114c0b71be
Inform failures in parallel tests before retrying
Displays for each failure which test it actually occurred in.  The
output destination follows the --{stdout,stderr}-on-failure option.
2024-02-29 18:05:00 +09:00
KJ Tsanaktsidis
fe0b704df5 Skip assert_no_memory_leak when ASAN is enabled
ASAN greatly increases the memory footprint of Ruby, so these static
thresholds are not appropriate. There's no real need to run these tests
under ASAN.

[Bug #20274]
2024-02-28 14:41:03 +11:00
Nobuyoshi Nakada
3c4d0b1313
Exclude .mailmap from snapshots [ci skip]
It is only for old commits, useless without full repository logs.
2024-02-25 19:12:55 +09:00
Naoto Ono
3371936b6f Add Launchable into CI 2024-02-23 14:10:01 +01:00
Takashi Kokubun
bccf4b30fa
Skip under_gc_compact_stress on s390x (#10073) 2024-02-22 14:34:19 -08:00
Nobuyoshi Nakada
5f7f229ae7
Adjust indent [ci skip] 2024-02-22 22:22:56 +09:00
Nobuyoshi Nakada
183c574d54
Save the performance warning flag 2024-02-22 22:05:04 +09:00
Nobuyoshi Nakada
1fa4d15ca7
Add Test::Unit::TestCase#method_name
For the compatibility with test-unit gem.
2024-02-21 15:45:53 +09:00
Nobuyoshi Nakada
104100f554
Split path.rb from mkrunnable.rb 2024-02-18 00:18:19 +09:00
Hiroshi SHIBATA
0301473fb5
Fixed dependencies list format 2024-02-16 17:59:38 +09:00
Hiroshi SHIBATA
9f708d48f6 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.
2024-02-16 17:28:00 +09:00
Yusuke Endoh
9d1b000bd1 Show the method owner in backtraces
```
test.rb:1:in 'Object#toplevel_meth': unhandled exception
        from test.rb:4:in 'Foo.class_meth'
        from test.rb:6:in 'Foo#instance_meth'
        from test.rb:11:in 'singleton_meth'
        from test.rb:13:in '<main>'
```

[Feature #19117]
2024-02-15 19:11:58 +09:00
Naoto Ono
a7ebe467a7 Add newline between end and def 2024-01-31 16:14:50 +09:00
Naoto Ono
45b53dd897 Add the ability to generate Launchable test reports 2024-01-31 16:14:50 +09:00
Luke Gruber
e12d4c654e Don't create T_MATCH object if /regexp/.match(string) doesn't match
Fixes [Bug #20104]
2024-01-01 13:28:26 -08:00
Nobuyoshi Nakada
67026af146
Exclude [ci skip] commits from ChangeLog 2023-12-28 15:01:25 +09:00
Nobuyoshi Nakada
606f7540ee
Exclude dependabot from ChangeLog [ci skip] 2023-12-28 15:01:24 +09:00
Takashi Kokubun
c25705c267 Get rid of obsoleted RJITFirst
It was renamed from test_mjit, but we did not maintain it as test_rjit.
We test RJIT very differently.
2023-12-22 20:20:42 -08:00
Peter Zhu
32ecda354f Support GC.auto_compact = :empty on debug builds
This commit adds `GC.auto_compact = :empty` which will run
auto-compaction sorting pages by empty slots so the most amount of
objects will be moved. This will make it easier to write tests for
auto-compaction.
2023-12-19 18:29:36 -05:00
Kazuhiro NISHIYAMA
9765ada69c Fix NoMethodError on fail
```
.../tool/lib/colorize.rb:56:in `resolve_color': undefined method `gsub' for an instance of Symbol (NoMethodError)

    color.gsub(/\b[a-z][\w ]+/) do |n|
	 ^^^^^
	from .../tool/lib/colorize.rb:47:in `decorate'
	from .../tool/lib/test/unit.rb:1012:in `block in failed'
```
2023-12-12 09:14:11 +09:00
Nobuyoshi Nakada
d9dbcd848f
Add bright colors and multiple attributes [ci skip]
Not only:
```
$ ruby colorize.rb fail foo
```

Also:
```
$ ruby colorize.rb 'bright_blue;bold' foo
```
2023-12-10 20:43:47 +09:00
Nobuyoshi Nakada
0096d6a809
Extract configuration and lookup methods [ci skip] 2023-12-10 20:43:44 +09:00
Peter Zhu
150ed44d87 Fix compaction during ary_make_partial
The ary_make_shared call may allocate, which can trigger a GC
compaction. This can cause the array to be embedded because it has a
length of 0.
2023-11-27 12:40:26 -05:00
Kevin Newton
323bec6295 RubyVM::InstructionSequence.compile_file_prism
* Provide a new API compile_file_prism which mirrors compile_file
but uses prism to parse/compile.
* Provide the ability to run test-all with RUBY_ISEQ_DUMP_DEBUG set
to "prism". If it is, we'll use the new compile_file_prism API to
load iseqs during the test run.
2023-11-20 12:45:29 -08:00
Yusuke Endoh
5bf75c20a2 Refactor the settings of test-all out
test/runner.rb and tool/lib/test/unit/parallel.rb must use the same
settings. However, some settings were copied and pasted, while some were
added only to test/runner.rb.
This changeset creates tool/test/init.rb for all settings of test-unit,
which is loaded not only by test/runner.rb but also
tool/lib/test/unit/parallel.rb.

Background: the GEM_HOME environment variable was removed in
test/runner.rb, which prohibit `require "rake"` (note that rake is a
bundled gem). However the parallel mode didn't refrect this setting,
i.e., `require "rake"` was allowed.
This leads to an inconsistency, which actually affected a test test
defines s test class *only when* `require "rake"` is successful.
(test/rubygems/test_gem_package_task.rb)

1851105563 (step):8:1714
```
  /home/runner/work/ruby/ruby/src/tool/lib/test/unit.rb:729:in `const_get': uninitialized constant TestGemPackageTask (NameError)

                suites.map! {|r| ::Object.const_get(r[:testcase])}
                                         ^^^^^^^^^^
```
2023-11-15 19:27:10 +09:00
lukeg
7717684d16 tool test/unit/testcase: rename vars @passed, @@current
to @__passed__, @@__current__.
@passed is redefined in a few test suites, and this could lead to bugs.

Also rename @options (Runner#options) to @__runner_options__, which is
only used in make test-tool anyway.
2023-10-26 12:39:13 +09:00
Hiroshi SHIBATA
df5bf5bb59
Removed unnecessary libraries of sync_tool 2023-10-23 17:28:50 +09:00