Commit graph

383 commits

Author SHA1 Message Date
Nobuyoshi Nakada
db7c38634e
core_assertions.rb: Raise Timeout::Error explicitly
So that `assert_raise` inside the block works.
2023-03-23 14:49:41 +09:00
Nobuyoshi Nakada
e340eb2106
core_assertions.rb: Fix backward compatibility with pre 2.7 2023-03-22 23:07:26 +09:00
Nobuyoshi Nakada
27916db08c
[DOC] Update comment of assert_pattern_list
`pattern_list` may contain string since d903e76726.
2023-03-22 22:35:58 +09:00
Nobuyoshi Nakada
09bda4ceb5
core_assertions.rb: Refine assert_linear_performance
* Calculate each timeout from the ratio of each factor to the first
  factor.
2023-03-22 18:53:12 +09:00
Nobuyoshi Nakada
ccd2dbc4c1 core_assertions.rb: Relax assert_linear_performance
* Use an `Enumerable` as factors, instead of three arguments.

* Include `assert_operator` time in rehearsal time.

* Round up max expected time.
2023-03-18 02:41:02 +09:00
Takashi Kokubun
a8e7fee801 Revert "core_assertions.rb: Refine assert_linear_performance"
This reverts commit cae4342dd5.

This is failing a lot of CIs and nobody is actively looking into fixing
it. Let me revert this until we have a solution to it.
2023-03-16 09:22:42 -07:00
Nobuyoshi Nakada
cae4342dd5
core_assertions.rb: Refine assert_linear_performance
* Use an `Enumerable` as factors, instead of three arguments.
2023-03-16 18:51:02 +09:00
Nobuyoshi Nakada
09041a6ee8
core_assertions.rb: Refine assert_linear_performance
* Add `rehearsal` keyword argument
* Stop repeating with the same factor
2023-03-15 18:19:31 +09:00
Nobuyoshi Nakada
7ce4b716bd
Add test for linear performance 2023-03-12 18:50:39 +09:00
Nobuyoshi Nakada
781222a8bc
core_assertions.rb: Consider backward compatibilities
This file is copied to default gems, which might support older
versions.
2023-03-12 18:40:41 +09:00
Hiroshi SHIBATA
1163204021 code style 2023-03-08 17:48:43 +09:00
Hiroshi SHIBATA
a7cee4da97 Added debug info to gemspec version check 2023-03-08 17:48:43 +09:00
Takashi Kokubun
23ec248e48 s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun
2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
lukeg
ba55706fb6 fix test/rubygems/test_gem_package_task.rb when in -j mode
This test skipped sometimes due to failure to load 'rake/packagetask'.
This is due to manipulation of $LOAD_PATH by other rubygems tests. If
rake is loaded before any rubygems tests run, then it works fine.

To reproduce the skipping behavior:
  $ make test-all TESTOPTS="-j6 --test-order=sorted test/rubygems/test_*.rb"
2023-02-28 06:34:27 +09:00
Hiroshi SHIBATA
db0a4c8923 Prefer to use File.foreach instead of IO.foreach 2023-02-27 18:49:18 +09:00
Nobuyoshi Nakada
ac5a949c2a
Refine exception messages when git failed 2023-02-22 10:23:05 +09:00
Nobuyoshi Nakada
37b6d98840 Use Gem::Package#build instead of the class method for old baseruby 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada
289080e4d8 Clone and create dummy gemspec in sequential build 2023-02-22 02:07:59 +09:00
Nobuyoshi Nakada
241c4cfdd4 Move dummy gemspec file creation for extract-gems-sequential 2023-02-22 02:07:59 +09:00
Yusuke Endoh
759d23584e Create a dummy minitest.gemspec for a bundled gem
To use the repository version of bundled gems, we need to build a gem by
"gem build", but the repository of minitest does not include
minitest.gemspec because it uses hoe.

This change creats a dummy minitest.gemspec to pass the CI.
2023-02-19 21:06:13 +09:00
Nobuyoshi Nakada
849087ccb1
Apply zone offset to the last modified time 2023-02-13 15:12:14 +09:00
Nobuyoshi Nakada
17f5631c6e [Bug #19340] Fix bundle gems with test revision
Build temporary gem package from cloned repository if test revision is
set.
2023-01-26 12:50:39 +09:00
Hiroshi SHIBATA
ba45be3c43
Supressing warnings messages like:
Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.

  Revert "Clear gem paths for each test"

  This reverts commit 6698b580dd.
2023-01-18 16:14:00 +09:00
Nobuyoshi Nakada
6698b580dd Clear gem paths for each test
So that rubygems can find the bundled rake.
2023-01-15 23:57:43 +09:00
Hiroshi SHIBATA
b496578758
Skip Test::Unit::AutoRunner logic in ruby/ruby repository 2023-01-05 08:16:24 +09:00
Hiroshi SHIBATA
1f2fef1f9a
[ruby/openssl] Stop AutoRunner with test-unit
0d4cd8b9ca
2023-01-05 08:06:49 +09:00
Koichi Sasada
c182d46d24 check NO_COLOR envval
Support `NO_COLOR` (https://no-color.org/) to make parsing output easy.
2022-12-26 23:06:35 +09:00
Nobuyoshi Nakada
3cbe37bd35
Support new style diagnostic reports 2022-12-25 00:43:27 +09:00
Samuel Williams
d20bd06a97
Remove require 'io/wait' where it's no longer necessary. (#6932)
* Remove `require 'io/wait'` as it's part of core now.

* Update ruby specs using version gates.

* Add note about why it's conditional.
2022-12-15 11:37:01 +13:00
Takashi Kokubun
3262842e0a
Skip calling f.read for overwrite: true-only cases
We only need to set outpath for that case.
2022-12-13 00:25:02 -08:00
Takashi Kokubun
5ba9dcff16
Make sure f.read is not called twice
--revision.h and --if-change are not used simultaneously, but they might
be in the future.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-12-13 00:17:47 -08:00
Takashi Kokubun
7edcdc380f
Avoid overwriting revision.h when .git doesn't exist (#6915)
* Avoid overwriting revision.h when .git doesn't exist

* Overwrite revision.h if it's blank
2022-12-12 23:34:30 -08:00
Nobuyoshi Nakada
e809bd31fd
Fix positional argument color [ci skip] 2022-12-12 23:32:37 +09:00
Nobuyoshi Nakada
d752cf7601 Use class methods of File over Kernel.open and IO.read 2022-12-01 02:28:49 +09:00
Nobuyoshi Nakada
70c9d5b504
Try to overwrite the file in VPATH if possible 2022-11-13 18:05:11 +09:00
Nobuyoshi Nakada
ab01b8f23f
jobserver option may not be at the last 2022-11-07 10:08:09 +09:00
Nobuyoshi Nakada
180d37c817
Set autoclose: for inherited FDs only [ci skip] 2022-11-07 09:06:15 +09:00
Nobuyoshi Nakada
12883f8fa6
GNU make 4.4 now uses a fifo for the jobserver 2022-11-06 23:39:55 +09:00
Peter Zhu
6d83590157 Don't report changed ENV caused by Bundler
Bundler's backups changes environment variables starting with
BUNDLER_ORIG_. This causes a lot of noise in tests as the leakchecker
reports them as changed.
2022-11-04 15:36:30 -04:00
Peter Zhu
b777408c33 Fix crash in test runner on timeout
When a test worker hangs and timeouts, the test runner crashes with the
following stack trace:

ruby/tool/lib/test/unit.rb:1747:in `puke': undefined method `backtrace' for Timeout::Error:Class (NoMethodError)
	from ruby/tool/lib/test/unit.rb:790:in `block in _run_parallel'
	from ruby/tool/lib/test/unit.rb:788:in `each'

This commit adds handling for Timeout::Error and outputs a message.
2022-11-02 13:34:02 -04:00
Nobuyoshi Nakada
3475b66160
file2lastrev.rb: try to overwrite the found revision.h as before 2022-11-02 12:38:31 +09:00
Nobuyoshi Nakada
ac06951c31
file2lastrev.rb: separate options for Output and VPath
So the `--srcdir` option in this file can override the same option in
`VPath`.
2022-11-02 12:38:03 +09:00
Nobuyoshi Nakada
a2e7b11f2a
output.rb: extract from generic_erb.rb
- writing to a file or stdout
- touching timestamp files
- overwriting only if changed
- colorizing
2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada
99a79dc40b
colorize.rb: support for NO_COLOR 2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada
f0c8c1e878
vpath.rb: tweak --vpath option message 2022-11-01 14:34:05 +09:00
Nobuyoshi Nakada
aa8c6759ee
vcs.rb: do not reference the constant before assignment 2022-11-01 11:40:32 +09:00
Nobuyoshi Nakada
00d5b7ce7c vcs.rb: copy safe directory configuration
Now revision.tmp will be regenerated always and every times, even if
the recent file exists in the source directory, as far as using git.
On the other hand, VirtualBox mounts shared folders as root, and git
rejects the repository there as dubious ownership.
2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada
b64514f132 vcs.rb: prettify debug print 2022-10-30 17:06:33 +09:00
Nobuyoshi Nakada
ab31d2e69f
Add --zone option to VCS
Which controls the timezone offset for `RUBY_RELEASE_DATE`.
2022-09-30 10:39:43 +09:00