summaryrefslogtreecommitdiff
path: root/test/lib
AgeCommit message (Collapse)Author
2019-12-01Check MJIT support in one placeTakashi Kokubun
to fix test failure on trunk-no-mjit https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123
2019-10-15Enforce --jit-debug test by another wayTakashi Kokubun
2019-09-26RubyVM::MJIT.pause(wait: true) should waitTakashi Kokubun
for all compilations and compaction. Prior to this commit, the last-compiled code has not been used because MJIT worker is stopped before setting the code, and compaction has also been skipped. But it was not intentional and `wait: true` pause should wait until those two things by its feature.
2019-09-01Automatically detect missing symbolsTakashi Kokubun
which are usually optimized away by -O3. This CI can detect missing exports like ea84a680755b5a7fa700618cbe78e3b2fc7be01d which was needed for 761346a9604ca2c79777d1d67fb5dcc3c30dbf69.
2019-07-09Restore support library for only test files that are digest and csv.Hiroshi SHIBATA
2019-07-09Restore support library for only test files.Hiroshi SHIBATA
2019-07-02Move to tool/lib from test/lib.Hiroshi SHIBATA
2019-07-01Return the result of the block given to assert_warning/assert_no_warningNobuyoshi Nakada
2019-06-30Add parentheses to suppress warningsNobuyoshi Nakada
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