Граф коммитов

2889 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada b291c972fa Use built bundled gems in test-bundled-gems 2022-07-25 08:50:07 +09:00
Nobuyoshi Nakada e0a7e5e131
Kill bundled gem tests when interrupted 2022-07-24 16:36:33 +09:00
Takashi Kokubun 5b21e94beb Expand tabs [ci skip]
[Misc #18891]
2022-07-21 09:42:04 -07:00
Jemma Issroff 85ea46730d Separate TS_IVC and TS_ICVARC in is_entries buffers
This allows us to treat cvar caches differently than ivar caches.
2022-07-18 14:06:30 -07:00
Nobuyoshi Nakada 64cff78005 `Gem.unpack` extracts gems so able to execute
Creates simple bin stubs to load the extracted executable files.
After only extracted under `gems` directory, the gems are considered
installed but the executable scripts are not found.
Also the second argument is now the parent of the previous second and
third arguments.
2022-07-17 19:57:48 +09:00
Nobuyoshi Nakada d20886dd22
Create build-only gemspec files only if having an extension 2022-07-17 10:30:56 +09:00
Nobuyoshi Nakada 6c1d7dab52
Fix conversion from absolute path to relative path 2022-07-16 17:58:52 +09:00
Nobuyoshi Nakada c093e7d645
Avoid to symlink under symlink 2022-07-16 16:38:03 +09:00
Nobuyoshi Nakada 5101671cbc
Disable parallel built in test-bundled-gems 2022-07-16 15:28:05 +09:00
Nobuyoshi Nakada 78d2be69b5
Move copying/linking extra files to Makefile so removed by `clean` 2022-07-16 10:11:42 +09:00
Peter Zhu 7424ea184f Implement Objects on VWA
This commit implements Objects on Variable Width Allocation. This allows
Objects with more ivars to be embedded (i.e. contents directly follow the
object header) which improves performance through better cache locality.
2022-07-15 09:21:07 -04:00
Nobuyoshi Nakada 9d900620ca Set `GEM_PATH` environment variable in runruby.rb 2022-07-14 09:00:13 +09:00
Nobuyoshi Nakada 416cba90c1 Try to install also gemspec files under gem directories
Gemspec files having extension libraries are placed under each gem
directories now.
2022-07-14 09:00:13 +09:00
Nobuyoshi Nakada a2c66f52f4 Make dependency-free gemspec files
The default gems have not been installed yet in the build directory,
bundled gems depending on them can not work.  As those dependencies
should be usable there even without rubygems, make temporary gemspec
files without the dependencies, and use them in the build directory.
2022-07-14 09:00:13 +09:00
Nobuyoshi Nakada e1a4e44f14 Extract gemspec files to each gem directories
Since extension libraries can not be built in the source directory,
rubygems warns gems have extension libraries as the extensions are not
built.  To order to suppress this warnings, extract such gemspec files
under each gem directories instead of the common `specifications`
directory.
2022-07-14 09:00:13 +09:00
Nobuyoshi Nakada d5c5fcb80a
Bundled gem extensions are out of scope of update-deps 2022-07-13 22:14:30 +09:00
Hiroshi SHIBATA 437a5ae9d6 Merge RubyGems and Bundler master 2022-07-13 14:11:55 +09:00
Nobuyoshi Nakada 1150a54afe
Use `File::PATH_SEPARATOR` for the portability 2022-07-09 19:00:56 +09:00
Nobuyoshi Nakada 67e54ce408
Fallback `mkdir_p` to `as_mkdir_p`
Assume `mkdir -p` to be race-free on recent systems.
And we do not provide install-sh anyway.
2022-07-07 15:06:10 +09:00
Nobuyoshi Nakada 5921bfc7ce
Add `--stdout-on-failure`, the reverse of `--stderr-on-failure` 2022-07-05 14:40:19 +09:00
Nobuyoshi Nakada 1b34bd07c1
Separate failed output option
It is unrelated to `GlobOption` at all.
2022-07-05 14:40:19 +09:00
Nobuyoshi Nakada 841521b7c1
Adjust indent [ci skip] 2022-06-30 10:50:31 +09:00
Aaron Patterson 8d157bc806 Move function to `static inline` so we don't have leaked globals
This function shouldn't leak and is only needed during instruction
assembly
2022-06-29 16:21:48 -07:00
Nobuyoshi Nakada f159bbd17d
Prevent accidental use of assert_raises 2022-06-25 19:09:06 +09:00
David Rodríguez 12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00
Nobuyoshi Nakada 7fd51c0241
vcs.rb: ignore configuration files get rid of aliases [ci skip] 2022-06-22 09:33:25 +09:00
Nobuyoshi Nakada bc77cda8fd
vcs.rb: just one log to check if `--date` option works [ci skip] 2022-06-22 09:32:01 +09:00
Nobuyoshi Nakada 0dcd25b711
vcs.rb: show diagnostic/progressing messages when debugging [ci skip] 2022-06-22 09:31:19 +09:00
Alan Wu 4b7c4bb92e tool/extlibs.rb: Use Exception#message for older rubies
This script runs with BASERUBY, which can be as old as 2.2.x.
Exception#full_message is new in 2.5.0.

I saw a NoMethodError on the AppVeyor CI where BASERUBY is 2.4.6:
https://ci.appveyor.com/project/ruby/ruby/builds/43870654/job/kae4uo2xbhuhqmdw#L121
2022-06-17 18:13:19 -04:00
Nobuyoshi Nakada 983f2688db
Hack to avoid leak checker 2022-05-25 18:48:01 +09:00
Nobuyoshi Nakada 78785fb990 [ruby/date] Constify gperf-generated table
https://github.com/ruby/date/commit/6d7ab08ffc
2022-05-24 17:23:42 +09:00
Takashi Kokubun ead96e7b44
Rename test_jit to test_mjit
to avoid confusion with YJIT
2022-05-20 21:32:55 -07:00
Jun Aruga dccfff943c Add `make test-annocheck` to detect security issues.
* Note that as the annocheck binary package is not available on Ubuntu, and it
  is working in progress in Debian, the script uses Fedora container, and
  it requires docker or podman command.
  https://www.debian.org/devel/wnpp/itp.en.html
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926470
* .github/workflows/compilers.yml: Add "gcc-11 annocheck" case.
  To pass the CI, set `TEST_ANNOCHECK_OPTS: "--skip-pie --skip-notes"` for now.
  See <https://bugs.ruby-lang.org/issues/18061>.
* Skip MJIT tests in case of annocheck case.
  The MJIT tests fail in the annocheck case.
  See <https://bugs.ruby-lang.org/issues/18781>.
2022-05-16 10:10:16 +02:00
Kazuhiro NISHIYAMA 2d1032075a
Stop `build_extensions` when DESTDIR set
Try to fix `make install without root privilege` failures on snapshot CIs.

example: https://github.com/ruby/actions/actions/runs/2315349280
2022-05-13 08:44:17 +09:00
Nobuyoshi Nakada c7d2247e35
Honor --with-thread option to enable pthread 2022-05-10 09:24:28 +09:00
Alan Wu b989c7c6ac
[DOC] Move :nodoc: so rdoc finds `RbConfig.ruby`
Rdoc [build] of `master` did not have this method but the reference manual [did].

[build]: https://docs.ruby-lang.org/en/master/RbConfig.html
[did]: https://docs.ruby-lang.org/ja/master/class/RbConfig.html#S_RUBY
2022-04-25 14:28:39 -04:00
Alan Wu 79fa27acc4 rbinstall: Also do `Gem.ruby` patching for unpacked bundled gems
Pointing `Gem.ruby` to the newly installed ruby gives mkmf the right
inputs to build extensions in bundled gems. Previously, this patching
was only done for compressed bundled gems.

This patch also prevents `tool/fake.rb` from propagating to the child
process running mkmf for the native extension. The way `tool/fake.rb`
changes mkmf variables using `Kernel#trace_var` created spooky action at
a distance which made debugging difficult.

AppVeyor Windows CI started to fail starting with
8a3663789c because it enabled extension
building for bundled gems on mswin. This patch should address the CI
failures.
2022-04-22 16:21:48 -04:00
Hiroshi SHIBATA c506ddac6c
Added assert_true and assert_false same as test-unit gem 2022-04-20 14:13:10 +09:00
Nobuyoshi Nakada a3ef0746ce
Extract `pipe_readlines` method which reads from the pipeline 2022-04-16 17:13:24 +09:00
Nobuyoshi Nakada b09e96341e
Simplify the condition expression to ignore commits 2022-04-16 16:45:46 +09:00
Nobuyoshi Nakada 492185e39c
Do not import any files under rakelib 2022-04-16 16:45:11 +09:00
Nobuyoshi Nakada 8a3663789c
Fix bundled gems installation when relative loading 2022-04-16 09:03:51 +09:00
Kazuhiro NISHIYAMA 7e4ac434b9
Skip build extensions again on cross compiling too 2022-04-13 14:40:24 +09:00
Kazuhiro NISHIYAMA 3112475469
Skip build extensions again on mswin and mingw 2022-04-13 13:40:57 +09:00
Kazuhiro NISHIYAMA 4246e102d4
Enabled to build extensions with the bundled gems again
cbb115213c
5c1b76a3a5
2022-04-13 11:09:23 +09:00
Nobuyoshi Nakada 5c1b76a3a5 Install built gem extension binaries 2022-04-07 09:47:10 +09:00
Nobuyoshi Nakada bb0a22a8c0 Obey spec file locations to rubygems 2022-04-07 09:47:10 +09:00
Alan Wu 21c8b9eb99 Copyedit parallel test harness crash message
Mea culpa.

Co-authored-by: Kaíque Kandy Koga <kaiquekandykoga@gmail.com>
2022-04-06 18:39:27 -04:00
Alan Wu 399ef463f7 Copyedit parallel test harness crash message 2022-04-06 18:11:43 -04:00
Kazuhiro NISHIYAMA d9c6f8d45c
Try to fix NoMethodError on slow environments
```
  1) Failure:
TestParallel::TestParallel#test_hungup [/home/user/ruby/tool/test/testunit/test_parallel.rb:215]:
Expected /^Retrying hung up testcases\.+$/ to match "Run options: \n" +
"  --seed=43403\n" +
"  --ruby\n" +
"  \"./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems\"\n" +
"  -j\n" +
"  t1\n" +
"  --worker-timeout=1\n" +
"\n" +
"# Running tests:\n" +
"\n" +
"/home/user/ruby/tool/lib/test/unit.rb:687:in `block in _run_parallel': undefined method `<' for nil:NilClass (NoMethodError)\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:538:in `block in quit_workers'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:537:in `reject!'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:537:in `quit_workers'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:687:in `_run_parallel'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:810:in `_run_suites'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:849:in `_run_suites'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1479:in `_run_anything'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1263:in `_run_anything'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1654:in `run_tests'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1641:in `block in _run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1640:in `each'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1640:in `_run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1682:in `run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1034:in `run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:882:in `run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:154:in `run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1761:in `run'\n" +
"\tfrom /home/user/ruby/tool/lib/test/unit.rb:1765:in `run'\n" +
"\tfrom /home/user/ruby/tool/test/testunit/tests_for_parallel/runner.rb:14:in `<main>'\n".
```
2022-04-05 19:23:38 +09:00
Benoit Daloze 4f25207e72 Use latest RSpec to get rspec-mocks ruby2_keywords fix 2022-04-05 11:42:02 +02:00
Kevin Newton 6068da8937 Finer-grained constant cache invalidation (take 2)
This commit reintroduces finer-grained constant cache invalidation.
After 8008fb7 got merged, it was causing issues on token-threaded
builds (such as on Windows).

The issue was that when you're iterating through instruction sequences
and using the translator functions to get back the instruction structs,
you're either using `rb_vm_insn_null_translator` or
`rb_vm_insn_addr2insn2` depending if it's a direct-threading build.
`rb_vm_insn_addr2insn2` does some normalization to always return to
you the non-trace version of whatever instruction you're looking at.
`rb_vm_insn_null_translator` does not do that normalization.

This means that when you're looping through the instructions if you're
trying to do an opcode comparison, it can change depending on the type
of threading that you're using. This can be very confusing. So, this
commit creates a new translator function
`rb_vm_insn_normalizing_translator` to always return the non-trace
version so that opcode comparisons don't have to worry about different
configurations.

[Feature #18589]
2022-04-01 14:48:22 -04:00
Nobuyoshi Nakada 663c297e34
Remove CI configuration files from extracted bundled gems 2022-03-31 10:49:56 +09:00
Nobuyoshi Nakada 8d27d00af5
Fix locations of the second argument 2022-03-30 14:38:33 +09:00
Nobuyoshi Nakada 5568cd5a55
Fix a missing comma 2022-03-28 17:02:02 +09:00
Nobuyoshi Nakada 152bb3c0b4
Use m4 comments outside macros in m4 files 2022-03-28 17:01:28 +09:00
Nobuyoshi Nakada 2cb3efffcf
Extract RUBY_REQUIRE_FUNCS 2022-03-28 16:56:15 +09:00
Nobuyoshi Nakada 69967ee64e
Revert "Finer-grained inline constant cache invalidation"
This reverts commits for [Feature #18589]:
* 8008fb7352
  "Update formatting per feedback"
* 8f6eaca2e1
  "Delete ID from constant cache table if it becomes empty on ISEQ free"
* 629908586b
  "Finer-grained inline constant cache invalidation"

MSWin builds on AppVeyor have been crashing since the merger.
2022-03-25 20:29:09 +09:00
Kevin Newton 629908586b Finer-grained inline constant cache invalidation
Current behavior - caches depend on a global counter. All constant mutations cause caches to be invalidated.

```ruby
class A
  B = 1
end

def foo
  A::B # inline cache depends on global counter
end

foo # populate inline cache
foo # hit inline cache

C = 1 # global counter increments, all caches are invalidated

foo # misses inline cache due to `C = 1`
```

Proposed behavior - caches depend on name components. Only constant mutations with corresponding names will invalidate the cache.

```ruby
class A
  B = 1
end

def foo
  A::B # inline cache depends constants named "A" and "B"
end

foo # populate inline cache
foo # hit inline cache

C = 1 # caches that depend on the name "C" are invalidated

foo # hits inline cache because IC only depends on "A" and "B"
```

Examples of breaking the new cache:

```ruby
module C
  # Breaks `foo` cache because "A" constant is set and the cache in foo depends
  # on "A" and "B"
  class A; end
end

B = 1
```

We expect the new cache scheme to be invalidated less often because names aren't frequently reused. With the cache being invalidated less, we can rely on its stability more to keep our constant references fast and reduce the need to throw away generated code in YJIT.
2022-03-24 09:14:38 -07:00
Peter Zhu 5f10bd634f Add ISEQ_BODY macro
Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using
this macro will make it easier for us to change the allocation strategy
of rb_iseq_constant_body when using Variable Width Allocation.
2022-03-24 10:03:51 -04:00
Nobuyoshi Nakada 1bb9e42fa5 extlibs.rb: Add fallback `Colorize`
To get rid of an unnecessary dependency for the case using
in other repositories.
2022-03-24 13:16:13 +09:00
Nobuyoshi Nakada 9ed6875f93 extlibs.rb: Enclose `Vars` in `ExtLibs` class
To get rid of an unnecessary top-level constant for the case using
as a library.
2022-03-24 13:16:13 +09:00
Nobuyoshi Nakada 247f8ecfa4 extlibs.rb: Extract ExtLibs#process
For the case using this script as a library.
- `ExtLibs#process` reads and processes an extlibs file.
- `ExtLibs#process_under` processes all extlibs files under the
  given directory.
- `Extlibs.run` parses `ARGV` and lets an instance process the
  directories.
2022-03-24 13:16:13 +09:00
Hiroshi SHIBATA 0024a76ea0
Ignore pre-release for sync target on sync_default_gems 2022-03-10 13:35:21 +09:00
Hiroshi SHIBATA 1adc7aa630
Added release option to sync only released version of the default gems 2022-03-08 21:08:46 +09:00
Hiroshi SHIBATA ff3d7b720e Merge RubyGems and Bundler master 2022-02-28 11:39:20 +09:00
Nobuyoshi Nakada 7f4345639b
fake.rb: Set prefix to `$topdir`
Not to refer outside the top build directory from rbconfig.
2022-02-27 21:58:59 +09:00
Nobuyoshi Nakada 8780f15fd7 [ruby/date] Use `assert_deprecated_warn`
https://github.com/ruby/date/commit/c55004715a
2022-02-25 20:39:47 +09:00
Peter Zhu 9bd4b2ab14 Add ABI version to RUBY_LIB_VERSION
This commit adds the ABI version as build metadata to
RUBY_LIB_VERSION. This will ensure that gems are installed in a path
with the ABI version.
2022-02-24 09:18:01 -05:00
Peter Zhu 3df16924b4 [Feature #18249] Implement ABI checking
Header file include/ruby/internal/abi.h contains RUBY_ABI_VERSION which
is the ABI version. This value should be bumped whenever an ABI
incompatible change is introduced.

When loading dynamic libraries, Ruby will compare its own
`ruby_abi_version` and the `ruby_abi_version` of the loaded library. If
these two values don't match it will raise a `LoadError`. This feature
can also be turned off by setting the environment variable
`RUBY_RUBY_ABI_CHECK=0`.

This feature will prevent cases where previously installed native gems
fail in unexpected ways due to incompatibility of changes in header
files. This will force the developer to recompile their gems to use the
same header files as the built Ruby.

In Ruby, the ABI version is exposed through
`RbConfig::CONFIG["ruby_abi_version"]`.
2022-02-22 09:55:21 -05:00
Nobuyoshi Nakada 2ae35ad766 RUBY_REPLACE_TYPE: check if the target type is a pointer 2022-02-19 15:33:15 +09:00
NARUSE, Yui 542a38f619 gen-mail.rb: support markdown file path 2022-02-18 21:44:22 +09:00
Koichi Sasada 00c7a0d491 fix parallel test timeout retrying
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
2022-02-16 17:57:04 +09:00
Jemma Issroff 2913a2f5cf Treat TS_ICVARC cache as separate from TS_IVC cache 2022-02-02 09:20:34 -08:00
David Rodríguez 517d7c3221 Sync latest Bundler & RubyGems 2022-02-01 08:09:23 +09:00
Jesse Chavez 99d02caed3 [ruby/logger] Fix log rotation inter-process lock failed.
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
2022-01-27 12:33:06 +09:00
Koichi Sasada cac6fe9023 add `--stderr-on-failure` option to test-all
Now all failure messages are printed to stdout. This option
makes all failure messages printed into stderr.
2022-01-26 09:56:09 +09:00
David Rodríguez de678cd51e
[ruby/pathname] Officially drop support for ruby 2.6 or older
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
2022-01-25 08:50:31 +09:00
Nobuyoshi Nakada 355bc37196
Reuse the default `AC_LANG_PROGRAM(C)` definition 2022-01-23 01:02:11 +09:00
Nobuyoshi Nakada ad150a1459
Override `AC_C_PROGRAM` on old autoconf
Autoconf 2.69 fails to detect `-Werror=old-style-definition` due
to the old style definition of `main`.
2022-01-22 20:13:46 +09:00
Koichi Sasada 374904b25f remain `RUBY_ON_BUG` for child processes.
`RUBY_ON_BUG` is useful for child processes created by the test
process.
2022-01-19 23:17:14 +09:00
Hiroshi SHIBATA d22511fd75 Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
2022-01-19 15:01:44 +09:00
Yuta Saito 420622b5a7 [wasm] add no thread variant for freestanding environment
This implementation does nothing around preemptive context switching
because there is no native thread.
2022-01-19 11:19:06 +09:00
Yuta Saito 65f95f26ff [wasm] add asyncify based setjmp, fiber, register scan emulation
configure.ac: setup build tools and register objects

main.c: wrap main with rb_wasm_rt_start to handle asyncify unwinds

tool/m4/ruby_wasm_tools.m4: setup default command based on WASI_SDK_PATH
environment variable. checks wasm-opt which is used for asyncify.

tool/wasm-clangw wasm/wasm-opt: a clang wrapper which replaces real
wasm-opt with do-nothing wasm-opt to avoid misoptimization before
asyncify. asyncify is performed at POSTLINK, but clang linker driver
tries to run optimization by wasm-opt unconditionally. inlining pass
at wasm level breaks asyncify's assumption, so should not optimize
before POSTLIK.

wasm/GNUmakefile.in: wasm specific rules to compile objects
2022-01-19 11:19:06 +09:00
Hiroshi SHIBATA 3515867381 Removed skip alias in test suite 2022-01-17 10:39:24 +09:00
Nobuyoshi Nakada 56b45e8c8e Let testunit use omit or pend instead of skip 2022-01-16 21:35:09 +09:00
Nobuyoshi Nakada d3940a533d
Fetch the unmerged revision to test of bundled gems 2022-01-14 14:54:29 +09:00
Yuta Saito e554b17c60 tool/rbinstall.rb: instal ruby.wasm produced by Emscripten 2022-01-06 18:14:24 +09:00
Hiroshi SHIBATA d6311cb1ca Track RubyGems 3.4.0dev and Bundler 2.4.0dev 2021-12-27 10:45:36 +09:00
NARUSE, Yui da4d6dc1ec tag's prefix is "v" 2021-12-25 22:19:02 +09:00
NARUSE, Yui 8325094177 Revert "Do not include external library sources into packages"
This reverts commit a042043487.
2021-12-25 21:22:02 +09:00
NARUSE, Yui 1cc02078e5 Revert "make-snapshot: add -extlibs option"
This reverts commit afa9d65d61.
It prevents installing libffi.
2021-12-25 21:01:37 +09:00
NARUSE, Yui 05faa36028 fix tool/format-release
Pass ruby directory path
2021-12-25 20:57:11 +09:00
Hiroshi SHIBATA da6a5e3ed1 Merge RubyGems-3.3.3 and Bundler-2.3.3 2021-12-25 07:40:52 +09:00
Nobuyoshi Nakada 083cf6a577
sync_default_gems.rb: Expand GH-xxxx style GitHub links [ci skip] 2021-12-24 14:34:14 +09:00
Nobuyoshi Nakada 097c4a2adf
sync_default_gems.rb: GitHub links at word boundary only [ci skip] 2021-12-24 14:27:03 +09:00
Hiroshi SHIBATA b0ad6cb371 Merge RubyGems-3.3.2 and Bundler-2.3.2 2021-12-24 10:35:31 +09:00
Hiroshi SHIBATA fb1ab27f53 Merge RubyGems-3.3.1 and Bundler-2.3.1 2021-12-23 09:44:45 +09:00
Hiroshi SHIBATA 69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00
Yuta Saito 3c7e95966d rbinstall.rb: install ext only when it's configured [Bug #18414] 2021-12-21 15:14:54 +09:00
Nobuyoshi Nakada c57ac4c6e0 Fix location of extensions in bundled gems when static-linked-ext
Install bundled gem extension files to the gem extension directory
under DESTDIR, when static-linked-ext as well as non-static case.
2021-12-21 02:01:57 +09:00
Yuta Saito f1a02ebfb9 Install gemspec even though no .rb and no .so
When building with --with-static-linked-ext, some exts without rb file
doesn't produce neither .so or .rb under .ext/common. Therefore, change
rbinstall.rb to install gemspec even if there is no .so or .rb for that
case.
2021-12-16 16:17:41 +09:00
Hiroshi SHIBATA 7e084ed707 Merge RubyGems and Bundler master
Merge from 793ad95ecb
2021-12-15 18:05:18 +09:00
Takashi Kokubun 1a63468831
Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
Kazuhiro NISHIYAMA 10eda60e8b
Merge to one regexp 2021-12-14 12:19:44 +09:00
Hiroshi SHIBATA b06e37e242
Followed up f5d80c26d4 for sync_default_gems.rb 2021-12-09 19:33:47 +09:00
Nobuyoshi Nakada e563c6068e
sync_default_gems.rb: convert commit hashes to github URLs [ci skip] 2021-12-06 14:18:01 +09:00
Alan Wu a785e6c356 Make `leaf` const in VM generator
Assigning to `leaf` in insns.def would give undesirable results.
2021-12-05 11:06:05 -05:00
Nobuyoshi Nakada 60fc8dda64
update-bundled_gems.rb: Fix typo and version comparison 2021-12-02 21:13:02 +09:00
Hiroshi SHIBATA 0b53a8895f
Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbd 2021-12-01 11:00:10 +09:00
Nobuyoshi Nakada 438220f063
Let pretty_inspect work once at first
For older pp.rb which did not need io/console, and dealing with
`LoadError`.
2021-11-30 14:16:33 +09:00
Nobuyoshi Nakada d400c44a55
Load io/console earlier
Something goes wrong at loading libraries inside `mu_pp` in the
test overriding `Class.inherited`.
2021-11-30 13:15:22 +09:00
Nobuyoshi Nakada d20a120b03
Recent systems prohibit symlink for relative loading 2021-11-30 12:40:12 +09:00
Nobuyoshi Nakada 4acc7563a1 Consider environment variable case-insensitiveness 2021-11-29 23:00:20 +09:00
Nobuyoshi Nakada 6586783508
Move win32ole.gemspec to the proper place 2021-11-26 11:32:38 +09:00
Nobuyoshi Nakada c8da3b95e7
Add win32ole to sync_default_gems.rb 2021-11-25 23:53:15 +09:00
Alan Wu 3d19c2900e No need to link and install .pdb anymore
With /Z7, no .pdb file is generated, so trying to link it during build
fails on my machine even though it's okay on CI.

By the way, in my local testing, no .pdb is generated in cwd at runtime
even without the /Fd option. I guess we can pass it just in case.
2021-11-24 23:45:57 +09:00
Hiroshi SHIBATA 84fdaaab46
Ignore LUCENSE files of standard libraries for sync target 2021-11-16 20:11:34 +09:00
Hiroshi SHIBATA cc3afdb165
Added LICENSE entry of vendored net-http-persistent to LEGAL 2021-11-16 20:07:30 +09:00
Hiroshi SHIBATA ef11414b1f
Added LICENSE entry of vendored connection_pool to LEGAL 2021-11-16 20:05:07 +09:00
Hiroshi SHIBATA 9a76072873
Added LICENSE entry of vendored molinillo to LEGAL 2021-11-16 19:51:06 +09:00
Hiroshi SHIBATA 1ff7b9cac4
Added LICENSE entry of vendored thor to LEGAL 2021-11-16 19:48:32 +09:00
Hiroshi SHIBATA 018266ca38
Merge digest-3.0.3.pre3 and efd76821b8 2021-11-16 19:42:20 +09:00
NARUSE, Yui 7a816b5fc8 Support preview release
Also add tag property.
2021-11-16 12:34:59 +09:00
Hiroshi SHIBATA cc50e57bf5
Relax extention name for macOS 2021-11-15 16:52:10 +09:00
Koichi Sasada b1b73936c1 `Primitive.mandatory_only?` for fast path
Compare with the C methods, A built-in methods written in Ruby is
slower if only mandatory parameters are given because it needs to
check the argumens and fill default values for optional and keyword
parameters (C methods can check the number of parameters with `argc`,
so there are no overhead). Passing mandatory arguments are common
(optional arguments are exceptional, in many cases) so it is important
to provide the fast path for such common cases.

`Primitive.mandatory_only?` is a special builtin function used with
`if` expression like that:

```ruby
  def self.at(time, subsec = false, unit = :microsecond, in: nil)
    if Primitive.mandatory_only?
      Primitive.time_s_at1(time)
    else
      Primitive.time_s_at(time, subsec, unit, Primitive.arg!(:in))
    end
  end
```

and it makes two ISeq,

```
  def self.at(time, subsec = false, unit = :microsecond, in: nil)
    Primitive.time_s_at(time, subsec, unit, Primitive.arg!(:in))
  end

  def self.at(time)
    Primitive.time_s_at1(time)
  end
```

and (2) is pointed by (1). Note that `Primitive.mandatory_only?`
should be used only in a condition of an `if` statement and the
`if` statement should be equal to the methdo body (you can not
put any expression before and after the `if` statement).

A method entry with `mandatory_only?` (`Time.at` on the above case)
is marked as `iseq_overload`. When the method will be dispatch only
with mandatory arguments (`Time.at(0)` for example), make another
method entry with ISeq (2) as mandatory only method entry and it
will be cached in an inline method cache.

The idea is similar discussed in https://bugs.ruby-lang.org/issues/16254
but it only checks mandatory parameters or more, because many cases
only mandatory parameters are given. If we find other cases (optional
or keyword parameters are used frequently and it hurts performance),
we can extend the feature.
2021-11-15 15:58:56 +09:00
Soutaro Matsumoto dee2e9b2be
Bundle RBS 1.7.0 (#5105)
* Bundle RBS 1.7.0

* tool/test-bundled-gems.rb: Use a correct path to Check if rbs is built

* tool/test-bundled-gems.rb: lib/rbs/parse.y is no longer created

Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
2021-11-12 02:01:53 +09:00
Nobuyoshi Nakada cc33d07f46
Disable experimental warnings in test/runner.rb 2021-11-10 17:42:09 +09:00
Samuel Williams 81d0ce7e97 Mark IO::Buffer as experimental. 2021-11-10 19:21:05 +13:00
Nobuyoshi Nakada 3ff0a0b40c
Filter method names only if filtering method name only
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-11-09 15:20:44 +09:00
Yusuke Endoh efe7e6e949 Bundle rbs 1.7.0.beta.5 2021-11-09 03:32:46 +09:00
Yusuke Endoh 30886be9f4 Skip bundled gem with an extension library under with-static-linked-ext
.. mainly to fix emscripten CI

http://rubyci.s3.amazonaws.com/crossruby/crossruby-master-wasm64_emscripten/log/20211104T024621Z.fail.html.gz
2021-11-05 09:34:46 +09:00
Yuta Saito 4e0747a8a2 Allow the thread-model to be switched by configure option
This change adds --with-thread=IMPL option to the configure. If not
supplied, default implementation for each platform will be used.
2021-10-30 10:18:33 +09:00
Yuta Saito 8590d61ea9 Select including thread impl file at config time 2021-10-30 10:18:33 +09:00
Yuta Saito ccda26efe7 Split thread-model config into another ac file
This is a first step to allow the thread-model implementation to be
switched by configure's option
2021-10-30 10:18:33 +09:00
Nobuyoshi Nakada 99c60d4b25 Get rid of exponential backtracks found by CodeQL
Since these regexps are used at build/installation, they are not
vulnerabilities.
2021-10-30 02:22:42 +09:00
Yusuke Endoh c1228f833c vm_core.h: Avoid unaligned access to ic_serial on 32-bit machine
This caused Bus error on 32 bit Solaris
2021-10-29 10:57:46 +09:00
Nobuyoshi Nakada e76e1d3ce4
Downloader: retry when RFC 2616 noncompliant dates [ci skip]
zlib.net rarely returns the current time in RFC 2616 noncompliant
format in the response header, and the checksum does not match in
that case (maybe creating the tarball on the fly?).
2021-10-28 17:42:36 +09:00
Vít Ondruch 5086c25f60 Properly exclude test cases.
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].
2021-10-27 19:56:19 +09:00
Koichi Sasada 8a49c7e481 Revert "introduce check code for mysterious EBADF"
This reverts commit 7864efa105.
2021-10-26 17:06:57 +09:00
Koichi Sasada d1424f7f7e Revert "check other IO#close calls"
This reverts commit a1c4cab11d.
2021-10-26 17:06:57 +09:00
Koichi Sasada a1c4cab11d check other IO#close calls
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-25 17:38:23 +09:00
Koichi Sasada 7864efa105 introduce check code for mysterious EBADF
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-25 15:47:09 +09:00
Alan Wu 7c08538aa3 Cleanup diff against upstream. Add comments
I did a `git diff --stat` against upstream and looked at all the files
that are outside of YJIT to come up with these minor changes.
2021-10-20 18:19:42 -04:00
Aaron Patterson 41f405c486 Remove the scraper
Now that we're using the jit function entry point, we don't need the
scraper.  Thank you for your service, scraper. ❤️
2021-10-20 18:19:38 -04:00
Aaron Patterson 30f20d7c38 Remove some MicroJIT vestiges
Just happened to run across this, so lets fix them
2021-10-20 18:19:36 -04:00
Alan Wu 5d834bcf9f YJIT: lazy polymorphic getinstancevariable
Lazily compile out a chain of checks for different known classes and
whether `self` embeds its ivars or not.

* Remove trailing whitespaces

* Get proper addresss in Capstone disassembly

* Lowercase address in Capstone disassembly

Capstone uses lowercase for jump targets in generated listings. Let's
match it.

* Use the same successor in getivar guard chains

Cuts down on duplication

* Address reviews

* Fix copypasta error

* Add a comment
2021-10-20 18:19:31 -04:00
Maxime Chevalier-Boisvert fe3bd57007 Remove trailing whitespaces 2021-10-20 18:19:31 -04:00
Jose Narvaez 4e2eb7695e Yet Another Ruby JIT!
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
2021-10-20 18:19:31 -04:00
Maxime Chevalier-Boisvert 2e561ff255 Restore interpreter regs in ujit hook. Implement leave bytecode. 2021-10-20 18:19:28 -04:00
Alan Wu 3c7251b41b Tally instructions when taking side exists for --ujit-stats
shopify/ruby#29

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2021-10-20 18:19:28 -04:00
Maxime Chevalier-Boisvert e4c65ec49c Refactor uJIT code into more files for readability 2021-10-20 18:19:26 -04:00
Alan Wu b75169a440 Fix typo 2021-10-20 18:19:26 -04:00
Alan Wu 5f9beb9b1b Include disassembly in MicroJIT scraper output 2021-10-20 18:19:26 -04:00
Alan Wu 11c1daea17 Add to the MicroJIT scraper an example that passes ec 2021-10-20 18:19:25 -04:00
Alan Wu 7662653b4c Fix compilation for OPT_THREADED_CODE=2 2021-10-20 18:19:24 -04:00
Alan Wu 2790428e55 Zero sized array are not standard C 2021-10-20 18:19:24 -04:00
Alan Wu a3e58f4df8 Compile with MicroJIT disabled when scrape fails
This is just so we can build successfully on -O0 and other cases that
are not supported by the code scraper.
2021-10-20 18:19:24 -04:00
Alan Wu f3c961f273 endbr64 is fine 2021-10-20 18:19:24 -04:00
Alan Wu 453218b272 Preliminary GNU/Linux support for code scraper
Let's see if this works on CI
2021-10-20 18:19:24 -04:00
Alan Wu 3d87eadf16 Refactor ujit_examples.h generator. Remove dwarfdump dependency 2021-10-20 18:19:24 -04:00
Maxime Chevalier-Boisvert 3739588811 Remove PC argument from ujit instructions 2021-10-20 18:19:23 -04:00
Alan Wu 16c5ce863c Yeah, this actually works! 2021-10-20 18:19:22 -04:00
Alan Wu cec197696f Add example handler for ujit and scrape it from vm.o 2021-10-20 18:19:22 -04:00
Nobuyoshi Nakada 6c74976aef Remove `Test::Unit::TestCase.make_my_diffs_pretty!`
`Test::Unit::CoreAssertions#mu_pp` is defined always using
`pretty_inspect`.
2021-10-18 17:36:06 +09:00
Nobuyoshi Nakada d1b8544b4d Remove `Test::Unit::Assertions#exception_details`
Never used since fa0f3eff22.
2021-10-18 17:36:06 +09:00
Nobuyoshi Nakada c7eac1be51
Retry hung up tests verbosely 2021-10-17 22:40:31 +09:00
Nobuyoshi Nakada 13716898df Retry hung tests after parallel runs 2021-10-17 16:33:58 +09:00
Nobuyoshi Nakada 478187e9a3 Timeout parallel test worker processes 2021-10-17 16:33:58 +09:00
Nobuyoshi Nakada 5de6e25144
Replace unpack with unpack1 2021-10-17 00:48:45 +09:00
Nobuyoshi Nakada 855db8e9ce
Use `__dir__` 2021-10-15 19:42:39 +09:00
Nobuyoshi Nakada 370fff98ce
Prefer `require_relative` 2021-10-15 18:47:25 +09:00
Nobuyoshi Nakada 679054208e
Use `__dir__` 2021-10-15 15:07:31 +09:00
Hiroshi SHIBATA 9e86a60306
Removed redundant digest namespace 2021-10-14 14:07:50 +09:00
Hiroshi SHIBATA 3265af2f9e
separate pure ruby location under the digest/* extensions 2021-10-14 13:31:45 +09:00
Hiroshi SHIBATA 13772caee2
Move pure ruby files under the ext/gemname/lib directory. 2021-10-14 13:23:45 +09:00
Pavel Rosický 94882df3a2
[ruby/digest] jruby support
https://github.com/ruby/digest/commit/2e9dc14693
2021-10-12 20:46:13 +09:00
Takashi Kokubun b5f0e20936
Add comments in sync_default_gems.rb
to ease the maintenance of ruby-commit-hook/bin/update-default-gem.sh
2021-10-10 23:49:15 -07:00
Takashi Kokubun 69cedee2a6
chmod +x tool/sync_default_gems.rb
I'm too lazy to start the command with `ruby`.
2021-10-10 23:38:51 -07:00
Nobuyoshi Nakada cec61d16d2
Run JIT tests first when random order instead of no-sort 2021-10-10 19:23:52 +09:00
Nobuyoshi Nakada fb9ea391cf
Default the test order to random 2021-10-10 18:30:33 +09:00
Nobuyoshi Nakada c423cc932e
Refactor `Test::Unit::CoreAssertions#assert_nothing_raised`
* 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-09 18:14:21 +09:00
Nobuyoshi Nakada fc913ad21d
Exclude also core_assertions.rb from backtraces 2021-10-09 16:17:37 +09:00
Nobuyoshi Nakada 3932227d96
Unify `Test::Unit::Assertions#message`
Merge `Test::Unit::CoreAssertions#message`.
2021-10-09 16:17:01 +09:00
Nobuyoshi Nakada 489c22b17f
Let `Test::Unit::CoreAssertions::AllFailures#for` yield the key
Similar to `Test::Unit::CoreAssertions::AllFailures#foreach`.
2021-10-09 14:28:27 +09:00
OKURA Masafumi 7e506716d2
Newly generated gems require Ruby 2.6.0
In 2021, Ruby 2.5 and older are EOL.
We can set the default required Ruby version to 2.6.0 to
encourage people to use newer Ruby.
If the command is executed with old Ruby, it falls back to 2.3.0.
It's still possible to create a gem for older Ruby just by changing
two lines of code (one in gemspec and another is in rubocop.yml).
2021-10-09 09:07:47 +09:00
Nobuyoshi Nakada 7c98e673d7
Fix a typo since 688f2e1a89 2021-10-05 18:24:34 +09:00
Koichi Sasada bc96a45f12 introduce debug.gem
For the `test-bundled-gems`, make `debug.so` with extconf.rb and
`make` command directly because `rake-compiler` assume ruby is
installed (but `test-bundled-gems` can run without installation).
2021-10-05 02:07:33 +09:00
Hiroshi SHIBATA cbb115213c Enabled to build extensions with the bundled gems 2021-10-05 02:07:33 +09:00
Nobuyoshi Nakada b44c5187b4 Expose instruction information for debuggers [Feature #18026] 2021-10-04 09:43:09 -07:00
Nobuyoshi Nakada c4570acc86
Refactor ordering of tests
* Split the sorting types into classes.
* Apply the same sorting to method sorting under the parallel
  test.
2021-10-04 20:46:47 +09:00
Nobuyoshi Nakada 44b2e32fb6
Fix a typo 2021-10-04 20:44:38 +09:00
Nobuyoshi Nakada 3842e723da
Leave builddir absolute
So that rubygems installer will work to build extension gems.
2021-10-04 20:04:38 +09:00
Nobuyoshi Nakada 0ad3ed5e0e
Checks for CPU specific header on universal build 2021-10-01 20:30:10 +09:00
Nobuyoshi Nakada c7414f517f
Prefer `printf` like the recent autoconf 2021-10-01 20:30:10 +09:00
Hiroshi SHIBATA 83662f1d99
Removed needless rake and bundler files for rdoc 2021-09-28 16:13:45 +09:00
fedor dd78084ea6 .cirrus.yml: Add Cirrus CI for Arm64 tests.
Co-authored-by: fedor <fedor@cirruslabs.org>
2021-09-22 09:01:43 +02:00
Nobuyoshi Nakada 34d6720fee
Prohibit test method redefinition 2021-09-17 08:54:18 +09:00
Hiroshi SHIBATA 43f49b2d1c
Fixup 455978cd13 2021-09-13 21:15:36 +09:00
Hiroshi SHIBATA ec6f04c092
Use capture_output instead of capture_io 2021-09-13 21:14:42 +09:00
Hiroshi SHIBATA be04006c7d
Rename capture_io to capture_output and deprecate to use capture_io 2021-09-13 20:56:34 +09:00
Hiroshi SHIBATA 455978cd13
Removed unused mu_pp method 2021-09-13 20:41:03 +09:00
Hiroshi SHIBATA f5993331b2
Renamed skip to pend and prepared to deprecate skip method 2021-09-13 19:09:24 +09:00
Nobuyoshi Nakada aaa9805e7e
Add unique token to separated runner
Same as Test::Unit::CoreAssertions#assert_no_memory_leak.
2021-09-13 15:47:45 +09:00
Hiroshi SHIBATA dbdceb8a19 Removed workaround for test_order 2021-09-13 14:39:23 +09:00
Hiroshi SHIBATA 2982464a8e
Revert "Resolved conflict initializers"
This reverts commit 62db6e47b6.

  308183fffa is the correct solution
  about this.
2021-09-13 11:07:32 +09:00
Nobuyoshi Nakada c8a1e57af0
Downloader: accept some RFC 2616 noncompliant dates 2021-09-13 01:48:43 +09:00
Nobuyoshi Nakada bbd105c445
Exclude option_parser from Test::Unit::Runner#inspect 2021-09-12 03:51:19 +09:00
Nobuyoshi Nakada 308183fffa
Prepend the modules in Test::Unit
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-12 03:45:58 +09:00
Hiroshi SHIBATA 8d0315a2bb
Removed unsed assertions for rubygems 2021-09-11 21:05:15 +09:00
Hiroshi SHIBATA d58e0ffc24
Removed unused alias for run_test 2021-09-11 20:35:18 +09:00
Hiroshi SHIBATA 64e056a4c5
Drop to Ruby 1.8 related code 2021-09-11 18:10:15 +09:00
Hiroshi SHIBATA a13ee1f33c
Removed rubinius support from test suite 2021-09-11 18:10:15 +09:00
Hiroshi SHIBATA aebd0a873e
Removed maglev related code because it's not active status now 2021-09-11 18:10:15 +09:00
Nobuyoshi Nakada 952806cdec
Update comments for minitest 2021-09-11 17:37:49 +09:00
Nobuyoshi Nakada cd83e716d0
Update an option message 2021-09-11 17:32:42 +09:00
Nobuyoshi Nakada 911f62e681
Directly alias orig_run_suite 2021-09-11 17:19:02 +09:00
Nobuyoshi Nakada 46bde60df3
Remove method filter hack for minitest 2021-09-11 17:12:27 +09:00
Nobuyoshi Nakada 30b4da2bc1
Update the test tool path 2021-09-11 16:26:00 +09:00
Hiroshi SHIBATA d9025ee2b5
fixup f73f9e1f89 2021-09-11 15:29:16 +09:00
Hiroshi SHIBATA 806583c093
Change include order for test assertions 2021-09-11 15:17:38 +09:00
Hiroshi SHIBATA f73f9e1f89
Replace minitest to test for backtrace_filter 2021-09-11 15:17:38 +09:00
Hiroshi SHIBATA b178929469
Fixed uninitialized constant Test::Unit::Assertions::MIN_MEASURABLE.
I'm not sure why it's failed under the chkbuild and rubyci.

  http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20210911T000007Z.fail.html.gz
2021-09-11 11:21:37 +09:00
Hiroshi SHIBATA 9583d2057d Added missing Assertions for assert_file_predicate 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA d05383812a Replace Test::Assertion and Test::Skip to Test::Unit::AssertionFailedError and Test::Unit::PendedError 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 7cec81e073 Removed needless require 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 151a1cd45e Fixed inconsistent require order for assertions and core_assertions 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA d7f0b41c7b Surpressing the noisy messages 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 980f61935f Temporary pend unknown behavior of parallel tests 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 566bbc2421 pend non-supported feature 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA bc1c09c6e8 More fixed assertion message tests 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 1c4f0f1eee We prepared Test::Unit::TestCase in default value 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 0fda70e3a3 We don't want to consistent assert and refute assertions 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 47928204b7 Fixed compatible assertion message format 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 0a5844cbdd Removed output assertion tests. Because our default runner is replaced by custom output 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 6b5400ccde Use msg format with test-unit 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 905c04d1e6 Use Test namespace instead of MiniTest in test_parallel.rb 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 9ff614bc13 Use Test::Unit::Assertions migrated with MiniTest::Assertions 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA ad979a5e00 Replace Test::Unit to Test::Unit::Runner migrated with MiniTest::Unit 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 6d206352c3 Use assert_raise instead of assert_raises 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA d5e94bf5db Replace MiniTest to Test 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 8aaa40e55f Move test of minitest to testunit 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA a3b0518672 Removed obsoleted constant 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 4505be6fd0 Removed MiniTest hack for the default gems repo 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 3451d4d941 Removed minitest dir and added LEGAL infomation for based code 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 9b026ca39b Integrate Minitest to Test 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 0598e87abf Use prepend for override to status line 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 8ee38bdd7d Removed duplicated autorun method 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 62db6e47b6 Resolved conflict initializers 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 7ef0a4634c Removed unused _run_suites 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 988eda744c Removed deprecated process_args 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 206af4727c Merge poke methods 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 1fd2a66a93 Merge run methods 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 374cc7231e Removed VERSION constant 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 8ec187c091 Replace MiniTest::Unit to Test::Unit::Runner 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA c18e953937 Move MiniTest::Unit to under Test::Unit::Runner 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 78ec066347 Use CoreAssertions instead of Assertions 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 48933a3409 Added default test-class for parallel tests 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA e4b5ac9b9a Use Test::Unit namespace 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA df86d78a26 Use self class for diff 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 3e32412e08 Fixed broken runner for `make test-all` 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 871e7b5f55 Use MiniTest 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 7456cbdd09 Move test_order under the Test::Unit::TestCase 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 93c44c4ed2 Move constants under the TestCase 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 54d2d70629 Migrate MiniTest::Unit::TestCase class under the Test::Unit 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 8431c718bb Removed needless compatibility for MiniTest 5 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 77763d4940 Removed needless alias about Minitest 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 1bec4f251d Move MiniTest::Assertions to Test::Unit::Assertions 2021-09-11 08:48:03 +09:00
卜部昌平 ef74483594 tool/strip-rdoc.rb: optimize
This script is called from Doxygen many times.  Worth optimising.
[ci skip]
2021-09-10 20:00:06 +09:00
Nobuyoshi Nakada 0b9242ffac
[Misc #18153] Install debug symbol files/directories by the option 2021-09-08 18:51:49 +09:00
Hiroshi SHIBATA ecfbf1df33
Use Test::Unit::PendedError instead of MiniTest::Skip for test-unit migration 2021-09-06 19:33:56 +09:00
Hiroshi SHIBATA 544e37f184
Simplify conditions for CoreAssertion initialization 2021-09-06 19:31:24 +09:00
Nobuyoshi Nakada 3a145066a6
Expand upstream issue numbers to URLs in ChangeLog 2021-09-04 00:26:39 +09:00
Nobuyoshi Nakada af68112a1b
Add some punctuations as regexp separators to fix commit logs 2021-09-03 23:46:33 +09:00
Nobuyoshi Nakada 41867532ac
No commits to pick is success [ci skip] 2021-08-31 19:07:08 +09:00
Nobuyoshi Nakada defdfa020a
Exit with the syncing status [ci skip] 2021-08-31 19:00:17 +09:00
aycabta 2d93b523e1 Add irb section to tool/sync_default_gems.rb 2021-08-30 03:00:02 +09:00
Nobuyoshi Nakada 265a725830
Handle non-succeeding reports mingled with dots 2021-08-29 16:32:55 +09:00
Nobuyoshi Nakada 6c40aa35a5
Memory::Status#_update should return `self` 2021-08-29 16:32:12 +09:00
Hiroshi SHIBATA 384c0f57aa
Added bundle install before bundle exec on rdoc sync 2021-08-25 15:02:29 +09:00
Yusuke Endoh b44741f5dc tool/test-bundled-gems.rb: Use the bundled RBS code to test TypeProf
Formerly, TypeProf was tested with the latest RBS code during
`make test-bundled-gems`. However, when a new version of rbs is
released, and if it is incompatible with TypeProf,
`make test-bundled-gems` starts failing, which was annoying.

By this change, TypeProf is tested with the bundled version of RBS.
2021-08-25 11:13:17 +09:00
Yusuke Endoh 4a6b5f4622 Revert "tool/test-bundled-gems.rb: Use the bundled RBS code to test TypeProf"
This reverts commit 22deda43cb.

It was incomplete. Sorry!
2021-08-24 18:08:16 +09:00
Hiroshi SHIBATA d140b03053
Added ruby/un entry 2021-08-24 18:02:44 +09:00
Yusuke Endoh 22deda43cb tool/test-bundled-gems.rb: Use the bundled RBS code to test TypeProf
Formerly, TypeProf was tested with the latest RBS code during
`make test-bundled-gems`. However, when a new version of rbs is
released, and if it is incompatible with TypeProf,
`make test-bundled-gems` starts failing, which was annoying.

By this change, TypeProf is tested with the bundled version of RBS.
2021-08-24 17:43:11 +09:00
Jeremy Evans 48c8df9e0e
Allow tracing of optimized methods
This updates the trace instructions to directly dispatch to
opt_send_without_block.  So this should cause no slowdown in
non-trace mode.

To enable the tracing of the optimized methods, RUBY_EVENT_C_CALL
and RUBY_EVENT_C_RETURN are added as events to the specialized
instructions.

Fixes [Bug #14870]

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2021-08-21 10:15:01 -07:00
Nobuyoshi Nakada 00d66f7ec2
Hard-link executable files to mae runnable
As `$ORIGIN` on Linux is refered from the real path of the
executable file, symbolic linked executable file cannot work.
2021-08-19 16:10:35 +09:00
Nobuyoshi Nakada 54199a3f5f
Use `VALUE` instead of `intptr_t`
On emscripten `intptr_t`, `uintptr_t`, `ptrdiff_t` and so on are
defined as `long`, but `PRIdPTR` and so on defined as `int`.
2021-08-16 15:36:37 +09:00
aycabta ef6dd407c8 Import Gemfile and Rakefile of rdoc by tool/sync_default_gems.rb 2021-08-10 02:36:00 +09:00
Nobuyoshi Nakada 6e60fc2945
Group commands on GitHub Actions 2021-08-07 18:32:24 +09:00
Nobuyoshi Nakada ae275f67ce Show WorkingSetSize as RSS on Windows 2021-08-05 17:14:38 +09:00
Koichi Sasada 228b3e43be check GC.enable'd status
Check GC.enable'd status before and after test execution.

Write this checker in gc_checker.rb, it was renamed from
gc_compact_checker.rb.
2021-08-05 17:11:50 +09:00
Nobuyoshi Nakada 3bb6410914
Use equivalent `__FILE__` 2021-08-05 14:15:30 +09:00
Nobuyoshi Nakada 5f2987d6c2
Fix relative paths from core_assertions.rb 2021-08-04 20:39:12 +09:00
Nobuyoshi Nakada 1f2b3f2529
Remove an extraneous escape
Since a3fb97465d, this string is not inside the here-document.
2021-08-04 16:59:18 +09:00
Hiroshi SHIBATA 0dcae3bd4a
Support document sync for optparse 2021-07-28 20:13:39 +09:00
Nobuyoshi Nakada 0754cc4888 Added intern_ids.rb 2021-07-27 15:40:27 +09:00
Nobuyoshi Nakada b8386f7f7f
Prepend DebugSystem to VCS class only
And revert 24e5f1c982, pepending to
Kernel did not affect the top level methods before 3.0.
2021-07-26 15:44:40 +09:00
Nobuyoshi Nakada 24e5f1c982
Ignore 7z unless available
`DebugSystem#system` is prepended in vcs.rb and defaulted to
`exception: true`.
2021-07-26 14:17:30 +09:00
Nobuyoshi Nakada c25cf1eaaa
Drop optional commit hash when updated 2021-07-21 20:44:13 +09:00
Andre Arko 44ba77d16d
[rubygems/rubygems] lock for development on macos
https://github.com/rubygems/rubygems/commit/60469e4cac
2021-07-16 15:40:07 +09:00
Nobuyoshi Nakada 4c039a2ea0
tool/sync_default_gems.rb: remove CRs 2021-07-13 19:36:52 +09:00
Nobuyoshi Nakada f9c559a0a2
sync_default_gems.rb: expand links to PRs of the upstream 2021-07-13 19:05:50 +09:00
Nobuyoshi Nakada 690385014a
Move core_assertions.rb from test/unit
This file contains extended assertions for ruby core which do not
belong to test/unit.
2021-07-11 19:56:53 +09:00
Nobuyoshi Nakada d6cf4c0c99
rbinstall.rb: just call File.basename directly 2021-07-08 17:58:25 +09:00
Martin Dürst 94fc4b1869 Adjust tool/enc-unicode.rb to deal with new location of some emoji files
- Change location of file emoji-data.txt
- Change range of files in emoji directory
  ([stz] is for emoji-sequences.txt, emoji-test.txt, and emoji-zwj-sequences.txt)
- Make sure that version of all emoji files is checked against Emoji version
2021-07-08 14:45:03 +09:00
Nobuyoshi Nakada afd4cfcf22
Try "so" attribute if "smso" is not found 2021-07-06 21:02:40 +09:00
Nobuyoshi Nakada 9c9531950c
rbinstall.rb: get rid of making directories when dryrun 2021-07-01 06:42:00 +09:00
Yusuke Endoh 3391682eda tool/sync_default_gems.rb: remove unneeded code for error_highlight sync 2021-06-30 11:39:39 +09:00
Yusuke Endoh 393f84da4a tool/sync_default_gems.rb: Add error_highlight gem 2021-06-30 10:56:59 +09:00
Yusuke Endoh d1998d8767 tool/test-bundled-gems.rb: Stop tests conflicting with error_highlight
This hack should be removed after the minitest side is updated.
https://github.com/seattlerb/minitest/pull/880
2021-06-29 23:45:49 +09:00
Nobuyoshi Nakada e724857f42
Show leaked file descriptors only, without cwd, txt, and so on 2021-06-27 21:17:58 +09:00
Nobuyoshi Nakada 3839a8fe79
Narrow the tracing of object allocations to during each test 2021-06-27 21:13:51 +09:00
Nobuyoshi Nakada fb978fab6d
Tests for MiniTest define anonymous test cases 2021-06-24 20:39:52 +09:00
Nobuyoshi Nakada e1c3cb9357
test: imply random test order by --seed option 2021-06-24 18:52:35 +09:00
Nobuyoshi Nakada 4c8c3fb230
Load rubygems before default gems 2021-06-24 13:01:47 +09:00
Hiroshi SHIBATA 6e7e9a80ad
Expose assert_all? for ruby/csv repo 2021-06-01 19:38:05 +09:00
Takashi Kokubun 0d32a18f5b
Make --without-mjit-tabs work again
vm_sync.{c,h} don't have tabs
2021-05-31 22:56:22 -07:00
Takashi Kokubun 2209e152c0
Decompose the captured_cc code for investigation
I'm investigating SEGVs like https://github.com/ruby/ruby/runs/2715166621?check_suite_focus=true.
Because a lot of things are going on on this line, it's hard to identify
the cause, especially because we can't get the core file of the failures.

Therefore I intentionally increased the number of lines for
investigation.
2021-05-31 21:57:57 -07:00
Jun Aruga ff6f4e631c tool/ci_functions.sh: Fix typos and improve the comment. [ci skip] 2021-05-31 16:24:16 +02:00
David Rodríguez 3954799071 Tweak skipped files in bundler gemspec
We won't be using the `extra_rdoc_files` field, because it's very slow
for markdown files.
2021-05-31 21:26:24 +09:00
Hiroshi SHIBATA ded7dd9ccc
Use require_relative to use Minitest library for testing.
There is no reason to care for minitest gem.
2021-05-28 11:38:37 +09:00
Hiroshi SHIBATA 029169bc5b
Fixed target directory when copying from upstream 2021-05-27 17:15:58 +09:00
Hiroshi SHIBATA c1c60a4498
Removed dbm from sync_default_gems 2021-05-27 17:14:31 +09:00
Hiroshi SHIBATA be2e2b4805 Promote net-smtp to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA aa9726f7b9 Promote net-pop to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA d5bc6b2337 Promote net-imap to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA e49c998d1e Promote net-ftp to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA 454a36794f Promote matrix to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA c9178c1127 Promote prime to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA edcc29dcff Removed gdbm from ruby repo 2021-05-25 20:04:54 +09:00
Jun Aruga 9d4266fd55 .travis.yml: Update to use arm64/ppc64le/s390x.
* Use only the free pipelines arm64/ppc64le/s390x without credits on Travis.
  See <https://docs.travis-ci.com/user/billing-overview/#partner-queue-solution>.
* Add ppc64le case.
* Update the gcc to gcc-11.
* Remove unused logic.
* Add the `tool/travis_wait.sh` to avoid a command timeout.
* Run the tests skipping some failing tests.
  * Set `TEST_ALL_SKIPPED_TESTS` env to skip the tests.
  * Run the tests separately returning ok status.
    The tests are executed if `TEST_ALL_SKIPPED_TESTS` env is set or
    `TEST_ALL_SEPARATED_TESTS` env is set.
  * Add `tool/ci_functions.sh` to manage the functions used in CI.
* Add arm64 to allow_failures due to the following issue.
  An arm64 job sometimes does not start right now.
  https://travis-ci.community/t/11629
2021-05-25 12:38:05 +02:00
Hiroshi SHIBATA 55cd3e4ebf Removed dbm from ruby repo 2021-05-25 15:18:31 +09:00
Hiroshi SHIBATA ab3266ea5c Removed tracer from ruby repo 2021-05-25 13:13:52 +09:00
Takashi Kokubun fb4195b969
Show a backtrace when tool/extlibs.rb fails
I'd like to retry this kind of error, but showing no backtrace is hard
to deal with.
https://github.com/ruby/ruby/runs/2644908002
2021-05-21 23:36:56 -07:00
Nobuyoshi Nakada 9edad0df74
Remove short options with argument [Bug #17870]
Remove GNU make `-O` and `-W` options which are short but followed
by an argument, so that `$mflags.set?(?n)` does not return `true`
wrongly.
2021-05-21 10:34:28 +09:00
Hiroshi SHIBATA adcbae8d49
Removed minitest/mock 2021-05-19 14:24:01 +09:00
Hiroshi SHIBATA 9bd79c2cef
Removed minitest/benchmark 2021-05-18 17:31:43 +09:00
Hiroshi SHIBATA 5a0b89de32
Removed minitest/autorun 2021-05-18 17:31:42 +09:00
Hiroshi SHIBATA 8ab2afb20b
Use Test::Unit instead of Minitest::Unit 2021-05-18 17:31:42 +09:00
Yusuke Endoh 5f8bca3257 tool/lib/minitest/mock.rb: define Object#stub only when not defined
Recently, lib/rubygems/test_case.rb also defines the method.
2021-05-14 18:10:07 +09:00
Takashi Kokubun cc1ea6e023
Run nmake check on Actions (#4487)
* Run nmake check on Actions

* Skip tests not working in mswin GitHub Actions

* Override TEMP

* Revert "Skip tests not working in mswin GitHub Actions"

This reverts commit 544d2575fcdf23ae63cd25aa03fce10c28b259f2.

* Revert "Revert "Skip tests not working in mswin GitHub Actions""

This reverts commit e1f8ad7862c9c4be52dc6e1031a004621eb07e6e.

* Fix timeouts

* Skip some more broken tests

* Update windows.yml

* Add a guard for rbasic_spec

* Revert "Update windows.yml"

This reverts commit bc9694b6b3b9594d406378d15ca11723fb052bc8.

* Skip the ensure clause

* Simplify the ensure
2021-05-11 15:18:44 -07:00
Hiroshi SHIBATA 010bb0883e
Workaround for make test-tool 2021-05-11 20:08:03 +09:00
Yusuke Endoh bb8a759f6b Fix a typo of c6a11b865e
It failed to define `refute_path_not_exist`
2021-05-11 19:46:15 +09:00
Hiroshi SHIBATA c6a11b865e
Alias assert/refute_path_exists for test-unit gem.
It's required at https://github.com/rubygems/rubygems/pull/3141
2021-05-11 19:32:35 +09:00
David Rodríguez 5b0abba931 Sync bundler & rubygems 2021-05-11 11:29:41 +09:00
David Rodríguez 15160e9b4f Sync bundler & rubygems at the same time 2021-05-11 11:29:41 +09:00
David Rodríguez 7dccc4ef8a Properly synchronize bundler gemspec too
By making the necessary modifications automatically.
2021-05-11 11:29:41 +09:00
David Rodríguez cc4d8d037c Simplify syncing bundler
These files no longer exist upstream, so they don't need to be synced.
2021-05-11 11:29:41 +09:00
Hiroshi SHIBATA 5de6f1ab47
Move net-imap.gemspec to under the lib/net/imap directory. 2021-05-06 15:20:35 +09:00
Benoit Daloze 68d6bd0873 Fix trivial -Wundef warnings
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
2021-05-04 14:56:55 +02:00