summaryrefslogtreecommitdiff
path: root/tool/lib
AgeCommit message (Collapse)Author
2022-12-26check `NO_COLOR` envvalKoichi Sasada
Support `NO_COLOR` (https://no-color.org/) to make parsing output easy. Notes: Merged: https://github.com/ruby/ruby/pull/7030
2022-12-25Support new style diagnostic reportsNobuyoshi Nakada
2022-12-15Remove `require 'io/wait'` where it's no longer necessary. (#6932)Samuel Williams
* Remove `require 'io/wait'` as it's part of core now. * Update ruby specs using version gates. * Add note about why it's conditional. Notes: Merged-By: ioquatix <[email protected]>
2022-12-13Skip calling f.read for `overwrite: true`-only casesTakashi Kokubun
We only need to set outpath for that case.
2022-12-13Make sure f.read is not called twiceTakashi Kokubun
--revision.h and --if-change are not used simultaneously, but they might be in the future. Co-authored-by: Nobuyoshi Nakada <[email protected]>
2022-12-12Avoid overwriting revision.h when .git doesn't exist (#6915)Takashi Kokubun
* Avoid overwriting revision.h when .git doesn't exist * Overwrite revision.h if it's blank Notes: Merged-By: k0kubun <[email protected]>
2022-12-12Fix positional argument color [ci skip]Nobuyoshi Nakada
2022-12-01Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6834
2022-11-13Try to overwrite the file in VPATH if possibleNobuyoshi Nakada
2022-11-07jobserver option may not be at the lastNobuyoshi Nakada
2022-11-07Set `autoclose:` for inherited FDs only [ci skip]Nobuyoshi Nakada
2022-11-06GNU make 4.4 now uses a fifo for the jobserverNobuyoshi Nakada
2022-11-04Don't report changed ENV caused by BundlerPeter Zhu
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-02Fix crash in test runner on timeoutPeter Zhu
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-02file2lastrev.rb: try to overwrite the found revision.h as beforeNobuyoshi Nakada
2022-11-02file2lastrev.rb: separate options for `Output` and `VPath`Nobuyoshi Nakada
So the `--srcdir` option in this file can override the same option in `VPath`.
2022-11-01output.rb: extract from generic_erb.rbNobuyoshi Nakada
- writing to a file or stdout - touching timestamp files - overwriting only if changed - colorizing
2022-11-01colorize.rb: support for NO_COLORNobuyoshi Nakada
2022-11-01vpath.rb: tweak --vpath option messageNobuyoshi Nakada
2022-11-01vcs.rb: do not reference the constant before assignmentNobuyoshi Nakada
2022-10-30vcs.rb: copy safe directory configurationNobuyoshi Nakada
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. Notes: Merged: https://github.com/ruby/ruby/pull/6647
2022-10-30vcs.rb: prettify debug printNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6647
2022-09-30Add `--zone` option to `VCS`Nobuyoshi Nakada
Which controls the timezone offset for `RUBY_RELEASE_DATE`. Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-30Introduce `VCS::Null` for fallbackNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-30Check for the availability of the command when detectingNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-30Pull up `VCS.short_revision` from `VCS::SVN`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6473
2022-09-17Remove git command existence check againTakashi Kokubun
With 33c6dd2cc89c27bbf406508ec39038a181fb99bc, it's no longer necessary. This is what I got on openbsd-current: ``` -bash-5.1$ git -v unknown option: -v usage: git [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] [--super-prefix=<path>] [--config-env=<name>=<envvar>] <command> [<args>] -bash-5.1$ git version git version 2.35.1 ```
2022-09-17Fallback to VCS.release_date on VCS::NotFoundErrorTakashi Kokubun
when -q is given. One of the RubyCI servers, freebsd12, had a broken git environment: ``` $ git show fatal: detected dubious ownership in repository at '/usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby' To add an exception for this directory, call: git config --global --add safe.directory /usr/home/chkbuild/chkbuild/tmp/build/20220917T123002Z/ruby ``` tool/lib/vcs.rb doesn't work normally for that server. Even for such cases, we'd like to generate a usable revision.h. So this patch lets revision.h fallback to default VCS.release_date when VCS::NotFoundError is raised.
2022-09-17Auto-generate the release date on version.h from git CommitDate (#6382)Takashi Kokubun
* Auto-generate the release date on version.h from git CommitDate * Generate revision.h on mswin Notes: Merged-By: k0kubun <[email protected]>
2022-09-14Replace "Fixes"/"Fixed" in commit logs as well as vcs.rb [ci skip]Nobuyoshi Nakada
Use the same regexp to replace "(#NNNN)" and "GH-NNNN" style references in vcs.rb, too.
2022-09-10Enable deprecation warnings for test-allBenoit Daloze
* So deprecated methods/constants/functions are dealt with early, instead of many tests breaking suddenly when removing a deprecated method/constant/function. * Follows https://bugs.ruby-lang.org/issues/17591 Notes: Merged: https://github.com/ruby/ruby/pull/6321
2022-09-01VCS#revision_header: Make arguments optionalNobuyoshi Nakada
2022-09-01Update revision.h in packages using `VCS#revision_header`Nobuyoshi Nakada
2022-09-01Extract `VCS#revision_header`Nobuyoshi Nakada
2022-09-01Fix test fail with assert_ractor outside of ruby/ruby repoHiroshi SHIBATA
Revert 806583c093ecc2d67830f0a8f0d94decf0ed71e5
2022-08-19Allow strings in assert_pattern_listNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6252
2022-08-05Load gemspec file at that directoryNobuyoshi Nakada
Gemspec files generated by old bundler run `git` without changing the working directory. Or some gemspec files expect an owned file at the top exists ath the current working directory. Notes: Merged: https://github.com/ruby/ruby/pull/6203
2022-08-05Move to tool/lib/bundled_gem.rbNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6203
2022-07-05Add `--stdout-on-failure`, the reverse of `--stderr-on-failure`Nobuyoshi Nakada
2022-07-05Separate failed output optionNobuyoshi Nakada
It is unrelated to `GlobOption` at all.
2022-06-25Prevent accidental use of assert_raisesNobuyoshi Nakada
2022-06-22vcs.rb: ignore configuration files get rid of aliases [ci skip]Nobuyoshi Nakada
2022-06-22vcs.rb: just one log to check if `--date` option works [ci skip]Nobuyoshi Nakada
2022-06-22vcs.rb: show diagnostic/progressing messages when debugging [ci skip]Nobuyoshi Nakada
2022-05-25Hack to avoid leak checkerNobuyoshi Nakada
2022-05-20Rename test_jit to test_mjitTakashi Kokubun
to avoid confusion with YJIT
2022-04-20Added assert_true and assert_false same as test-unit gemHiroshi SHIBATA
2022-04-06Copyedit parallel test harness crash messageAlan Wu
Mea culpa. Co-authored-by: KaĆ­que Kandy Koga <[email protected]>
2022-04-06Copyedit parallel test harness crash messageAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/5772
2022-04-05Try to fix NoMethodError on slow environmentsKazuhiro NISHIYAMA
``` 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". ```