summaryrefslogtreecommitdiff
path: root/test/lib
AgeCommit message (Collapse)Author
2019-06-22Use EXEEXTNobuyoshi Nakada
* test/lib/minitest/unit.rb (MiniTest::Assertions.diff): use `EXEEXT` configured value instead of switching by hard coded `host_os`.
2019-06-22Show timed out threadsNobuyoshi Nakada
* test/lib/test/unit/assertions.rb (assert_join_threads): kill and show timed out threads.
2019-06-22Fix over-expansionNobuyoshi Nakada
* test/lib/minitest/unit.rb (MiniTest::Assertions#mu_pp_for_diff): do not expand escaped backslash followed by 'n'.
2019-06-14Use Exception#full_message for tracebackNobuyoshi Nakada
2019-06-13test/lib/test/unit/assertions.rb (assert_cpu_usage_low): tweak the waitYusuke Endoh
It still fails randomly. https://rubyci.org/logs/rubyci.s3.amazonaws.com/amazon2/ruby-master/log/20190613T093003Z.fail.html.gz https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20190613T051547Z.fail.html.gz
2019-06-11assert_cpu_usage_low with timeout scaleNobuyoshi Nakada
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low): apply the timeout scale to measuring period. this assertion is very runtime environment dependent.
2019-06-11MIN_HZ and MIN_MEASURABLE constantsNobuyoshi Nakada
* test/lib/test/unit/assertions.rb (Test::Unit::Assertions): promoted MIN_HZ and MIN_MEASURABLE as constants, which should be constant through the process.
2019-06-11Generalize timeout_scaleNobuyoshi Nakada
* test/lib/test/unit.rb (Test::Unit::TimeoutOption): renamed SubprocessOption. * test/lib/test/unit.rb (Test::Unit::TimeoutOption#setup_options): prefer `--timeout-scale` option. * test/lib/test/unit.rb (Test::Unit::TimeoutOption#non_options): prefer `ENV["RUBY_TEST_TIMEOUT_SCALE"]`.
2019-06-11test/lib/test/unit/assertions.rb (assert_cpu_usage_low): Relax the limitYusuke Endoh
CPU usage 1% causes occesional test failure. Try to use 5%. https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-master/log/20190604T153002Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-master/log/20190610T153002Z.fail.html.gz
2019-06-07Report a sudden death of workersNobuyoshi Nakada
2019-06-04test/lib/test/unit.rb: use colorize.rbNobuyoshi Nakada
2019-05-26test/lib/envutil.rb (EnvUtil.timeout): added.Yusuke Endoh
It is a wrapper for Timeout.timeout with the scale factor applied.
2019-04-29Make only `mesg` can be assigned with default `fname`Nobuyoshi Nakada
2019-04-18io.c: warn non-nil $,nobu
* array.c (rb_ary_join_m): warn use of non-nil $,. * io.c (rb_output_fs_setter): warn when set to non-nil value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-30Show the code in syntax assertionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-11Ensure to terminate the childnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10test_jit.rb: change format of test error outputk0kubun
to avoid breaking redmine quote like https://bugs.ruby-lang.org/issues/15522 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28jit_support.rb: deal with -std=c99 flagk0kubun
CC is changed from "icc" to "icc -std=c99" by r66605. https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181228T130003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27test/mkmf/test_flags.rb: try to suppress random CI failurek0kubun
on AIX ppc https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20181226T113305Z.fail.html.gz test/lib/test/unit/assertions.rb: ditto, for TestIO#test_copy_stream_no_busy_wait git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27jit_support.rb: skip testing MJIT on oracle developer studiok0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-15test/lib/test/unit.rb: do not propagate MAKEFLAGS to childrennormal
Propagating MAKEFLAGS to children running test/unit caused stuck tests with GNU make when "-jN" is passed in both the make(1) command-line and the "TESTS=" variable; because the forked child process would see MAKEFLAGS and try to use jobserver on its own. This is regression caused by r64399 (commit b53fadfd5f200dbd6fe9f4b2a91ebb68618e59bb, "process.c: defaults to close_others false"); but that change also fixed a regression when close-on-exec became the default in 2.0 :< git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07mjit_build_dir: separate MJIT_BUILD_DIRnobu
* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to eliminate the feature for test-all after installation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06Revert "mjit_build_dir: separate MJIT_BUILD_DIR"nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06mjit_build_dir: separate MJIT_BUILD_DIRnobu
* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to eliminate the feature for test-all after installation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26parse.y: remove "shadowing outer local variable" warningmame
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. A patch from Soutaro Matsumoto <matsumoto@soutaro.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26Revert "parse.y: remove "shadowing outer local variable" warning"mame
I forgot to add the copyright of the patch... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26parse.y: remove "shadowing outer local variable" warningmame
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23test/unit.rb: glob w/o prefix/suffixnobu
* test/lib/test/unit.rb (Test::Unit::GlobOption#non_options): glob the given pattern as-is under the TESTSDIR without the prefix nor the suffix, when it has separator(s) but does not end with a separator nor is not a directory. e.g.: make test-all TESTS='ruby/test_time*' runs `ruby/test_time.rb` and `ruby/test_time_tz.rb` only, like as the following: make test-all TESTS='$(TESTSDIR)/ruby/test_time*' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23test/unit.rb: fixed wrong method namenobu
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): fixed wrong method name at r36388. * test/testunit/test_parallel.rb (TestParallel::TestParallel#test_separate): refine the pattern to process IDs but not backtrace lines, and add a better message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23test/lib/test/unit/assertions.rb: skip memory leak checkk0kubun
for all test cases on MJIT. In addition to those 2 tests, TestAutoload#test_no_leak newly failed and most of assert_no_memory_leak usages are likely to randomly fail. Let me just skip all of them but let's revisit this to check it properly later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22revisit more MJIT test skipsk0kubun
r65308 passed both trunk-mjit and trunk-mjit-wait CIs. MJIT copy job looks working fine. Then this commit skips 5 more tests. Some of them were skipped in a very early stage and may still need to be skipped, but I want to confirm them since they haven't been changed for a long time. And this prefers having inline information on `RubyVM::MJIT.enabled?`. This commit makes it easier to confirm whether there's suspicious test skip by RubyVM::MJIT.enabled? or not. After this commit, tentatively we're not skipping tests for MJIT other than `assert_no_memory_leak` ones. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20require 'rbconifg' earlier.ko1
* test/lib/jit_support.rb: require rbconfig here. * test/ruby/test_jit.rb: rbconfig should be required before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test/lib/jit_support.rb: continue to skip test_jitk0kubun
for icc since it's not supported yet but running on rubyci. This reverts some part of r65175, r65176 and r65177. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19test/lib/jit_support.rb: fire test_jit everywherek0kubun
That was a workaround to make rubyci green for a short term after the MJIT merge. As we've done many portability fixes for MJIT, let's try running test_jit on all rubyci platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-24test/unit.rb: fix --subprocess-timeout-scalenobu
* test/lib/test/unit.rb (Test::Unit::SubprocessOption#non_options): set timeout scale after parsing options. the option value will be set after returning from setup_options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16Propagate subprocess timeout scale option to worker processesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31test/lib/test/unit/assertions.rb: explicit delegation of keyword argumentsmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23test/readline/test_readline.rb: fix readline testk0kubun
for mingw. test/lib/minitest/unit.rb: Add 'guards' for mingw. Removed still-unused method `mswin?` from original patch. [Fix GH-1941] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18test/lib/zombie_hunter.rb: enable zombie hunter for MJITk0kubun
I think this issue is solved by Eric Wong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16process.c: defaults to close_others falsenormal
Arbitrarily closing file descriptors on exec breaks use cases where a Ruby process sets up a descriptor for non-Ruby children to use. For example, the "rake foo" target may spawn any number of subprocesses (Ruby or not) which depends on parsing the "FOO" environment variable for out_fd:99 and writing to foo.out FOO=out_fd:99 rake foo 99>>foo.out Unfortunately, this introduced one incompatibility in test/lib/test/unit.rb and it now requires explicitly setting IO#close_on_exec=true [ruby-core:88007] [Misc #14907] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-14Revert "test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files"normal
This reverts commit 52102f6ff50eebf8c16667c9b49cef579d2057c1 (r64238). It is no longer necessary if we use Tempfile.create in WEBrick::HTTPAuth::Htgroup#flush (see next commit) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09mjit.c: add :wait option to RubyVM::MJIT.pausek0kubun
and wait until JIT queue is flushed when wait option is not passed or `wait: true` is passed. vm.c: ditto test/ruby/test_rubyvm_mjit.rb: added test for pause/resume test/lib/jit_support.rb: allow retrying MJIT on JITSupport level test/ruby/test_jit.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-09test/lib/leakchecker.rb (find_tempfiles): don't warn for missing filesnormal
Quiet a false-positive warning from TestHtgroup#test_htgroup git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31mjit.c: allow using MJIT header in build directoryk0kubun
when $MJIT_SEARCH_BUILD_DIR is set. If prefix path is owned by root, `make install` needs to be run by root. But in general we don't want to run `make test-all`, and also running `make test-all` currently fails due to permission tests of rdoc and rubygems. Thus, prior to this commit, specifying a prefix like "/usr/local" could mean there was no way to pass test-all. So we should not depend on `make install` for `make test-all`. Thus I reverted r64104 and r64103, and applied this workaround to pass `make test-all` without `make install`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-27test_jit.rb: test unload_unitsk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29test/lib/test/unit/assertions.rb (assert_in_out_err): disable gemsnormal
RubyGems loading is still a bottleneck at startup and this speeds up test/ruby/test_rubyoptions.rb test from 15s => 3.5s on the fastest machine I have access to. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Added guard condition for old ruby about RubyVM::MJIT.hsbt
Test libraries under the test/lib is used with default gems in their repositories. default gems may support old ruby like Ruby 2.5. When default gems invoke test libraries of Ruby core with old ruby, they raised `uninitialized constant RubyVM::MJIT (NameError)` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05test/lib/jit_support.rb: spelling: s/skiped/skipped/normal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27jit_support.rb: debug check_support stderrk0kubun
rubyci freebsd11zfs doesn't pass this check. I want to know the stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27jit_support.rb: cahce JIT support checkk0kubun
* Before make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb" 22.40s user 5.38s system 91% cpu 30.196 total * After make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb" 12.91s user 3.33s system 91% cpu 17.648 total Also, this makes it easier to check if JIT is actually tested, by showing warning on stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e