aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib
Commit message (Collapse)AuthorAgeFilesLines
* test/unit.rb: defer failures in non-replace modenobu2016-03-221-1/+1
| | | | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#failed): print failed messages only if replacing mode, otherwise defer them until the end, to get rid of interleaving failures with progress messages. refix r54195. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: show crashed filenobu2016-03-211-0/+1
| | | | | | | * test/lib/test/unit.rb (after_worker_down): show failed file name if worker crashed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: defer failures in verbose modenobu2016-03-191-0/+1
| | | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#failed): defer failed messages until the end in verbose mode, to get rid of interleaving failures with progress messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix result of assert_nothing_raisednobu2016-03-171-1/+0
| | | | | | | * test/lib/test/unit/assertions.rb (assert_nothing_raised): do not discard the result of the given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/test/unit.rb: describe !/REGEXP/ in the help message.akr2016-03-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* testunit: negative filternobu2016-03-111-4/+26
| | | | | | | | | * test/lib/test/unit.rb (Options#non_options): make regexp name options prefixed with "!" negative filters. * common.mk (TEST_EXCLUDES): use negative filter to exclude memory leak tests. -x option excludes test files, not test methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* memory_status.rb: independent of MiniTestnobu2016-03-092-12/+19
| | | | | | | | | * test/lib/memory_status.rb: make Memory::Status independent of MiniTest::Skip. * test/lib/test/unit/assertions.rb (assert_no_memory_leak): skip if Memory::Status is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* memory_status.rb: remove unused valuesnobu2016-03-091-3/+2
| | | | | | | * test/lib/memory_status.rb: remove initial status values, which are not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: not return the cursor if verbosenobu2016-03-031-1/+1
| | | | | | | * test/lib/test/unit.rb (update_status): do not return the cursor if verbose mode, not results and times to overwrite test names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: return the cursornobu2016-03-021-3/+4
| | | | | | | | | * test/lib/test/unit.rb (update_status): keep the cursor to the beginning of the line for each update, so that unexpected output like an error message will overwrite but not be concatenated to the status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: refine output in job_status=normalnobu2016-02-271-6/+9
| | | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#jobs_status): show status of only changed woker, not to show same lines repeatedly, in normal job_status mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: fix for the testnobu2016-02-271-2/+7
| | | | | | | | | | | | | | | | * test/lib/test/unit.rb (_run_parallel): make sure retrying message is a separate line. * test/lib/test/unit.rb (_prepare_run): do not add Output if testing. * test/lib/test/unit.rb (Skipping#failed): defer showing reports when showing skips, to be sorted. * test/testunit/test_hideskip.rb (test_hideskip): fix assertion for output misordered by mixing output destinations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: refine output in verbose modenobu2016-02-271-13/+11
| | | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run): add StatusLine::Output even if job_status is not replace, to filter extra outputs and newlines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: add --jobs-status=nonenobu2016-02-271-2/+2
| | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#setup_options): add :none to --jobs-status option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: no newlines to be chompednobu2016-02-271-1/+1
| | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine::Output#print): matched part never contains a newline to be chomped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix assert_no_memory_leaknobu2016-02-171-2/+2
| | | | | | | * test/lib/test/unit/assertions.rb (assert_no_memory_leak): fix path of memory_status.rb, as this method has been moved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* incompatible encoding workaroundnobu2016-02-052-2/+2
| | | | | | | | | * test/lib/minitest/unit.rb (puke): workaround incompatible encoding error messages. * test/lib/test/unit/assertions.rb (AllFailures.message): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* follow r53691kazu2016-02-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning: assigned but unused variablenaruse2016-01-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove extra dotnobu2016-01-171-1/+1
| | | | | | | * test/lib/test/unit/assertions.rb (all_assertions): remove tail dot as it is added in message again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* leakchecker.rb: remove temporary measurenobu2016-01-051-1/+1
| | | | | | | | | | | | | * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#watcher): make watcher thread restartable. * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#terminate): new method to terminate watcher thread. * test/lib/leakchecker.rb (LeakChecker#find_threads): revert r46941. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: show failed indexesnobu2015-12-201-3/+7
| | | | | | | * test/lib/test/unit/assertions.rb (AllFailures): show indexes in total number of failure assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: color on ttynobu2015-12-191-1/+1
| | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run): colorize by default on tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: fix outputsnobu2015-12-191-10/+6
| | | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#update_status): do not print extra empty lines when running on non-tty. fix colorizing in verbose mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: use full columnsnobu2015-12-181-15/+9
| | | | | | | | * test/lib/test/unit.rb (Test::Unit::StatusLine#update_status): exclude colorizing escape sequences from @status_line_size to use full columns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Exception#backtrace may be nil if it is manually creatednaruse2015-12-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1617-0/+17
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: use String#b instead of dup.force_encodingnobu2015-12-141-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: move enutil's assertions under Test::Unit::Assertion.hsbt2015-12-132-341/+334
| | | | | | * test/lib/test/unit/assertions.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c: rename methodsko12015-12-091-3/+3
| | | | | | | | | | | | | | | | | | | RubyVM::InstructionSequence#to_binary_format -> #to_binary RubyVM::InstructionSequence.from_binary_format -> .load_from_binary RubyVM::InstructionSequence.from_binary_format_extra_data -> .load_from_binary_extra_data * iseq.c: fix document of iseq.to_binary. [Fix GH-1134] * sample/iseq_loader.rb: catch up this change. * test/lib/iseq_loader_checker.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: improve messagenobu2015-12-081-2/+4
| | | | | | | * test/lib/envutil.rb (assert_ruby_status): show also outputs at normal exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * introduce new ISeq binary format serializer/de-serializerko12015-12-081-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and a pre-compilation/runtime loader sample. [Feature #11788] * iseq.c: add new methods: * RubyVM::InstructionSequence#to_binary_format(extra_data = nil) * RubyVM::InstructionSequence.from_binary_format(binary) * RubyVM::InstructionSequence.from_binary_format_extra_data(binary) * compile.c: implement body of this new feature. * load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq): call RubyVM::InstructionSequence.load_iseq(fname) with loading script name if this method is defined. We can return any ISeq object as a result value. Otherwise loading will be continue as usual. This interface is not matured and is not extensible. So that we don't guarantee the future compatibility of this method. Basically, you should'nt use this method. * iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions) from iseq.c. * encoding.c (rb_data_is_encoding), internal.h: added. * vm_core.h: add several supports for lazy load. * add USE_LAZY_LOAD macro to specify enable or disable of this feature. * add several fields to rb_iseq_t. * introduce new macro rb_iseq_check(). * insns.def: some check for lazy loading feature. * vm_insnhelper.c: ditto. * proc.c: ditto. * vm.c: ditto. * test/lib/iseq_loader_checker.rb: enabled iff suitable environment variables are provided. * test/runner.rb: enable lib/iseq_loader_checker.rb. * sample/iseq_loader.rb: add sample compiler and loader. $ ruby sample/iseq_loader.rb [dir] will compile all ruby scripts in [dir]. With default setting, this compile creates *.rb.yarb files in same directory of target .rb scripts. $ ruby -r sample/iseq_loader.rb [app] will run with enable to load compiled binary data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.ko12015-12-071-0/+55
| | | | | | | | | | | | | | | | | | If you enable this checker (remove `#' in test/runner.rb), you can see comparison results between an original iseq disassembed result and dumped and loaded iseq disassembed result. There are several bugs around there, because of inexact stack depth calculation. Now, I leave these bugs because they are not critical and difficult to solve completely. * test/runner.rb: require test/lib/iseq_loader_checker.rb but disabled at default (commented out). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fallback encoding errornobu2015-12-051-1/+5
| | | | | | | * test/lib/test/unit/assertions.rb (message): fallback when outputs from different encoding commands mixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* SIGTERM should be also capturednaruse2015-11-291-1/+1
| | | | | | | because it will terminate the whole test process when it is re-raised from this assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* read may return nilnaruse2015-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/runner.rb: extracted test helper.hsbt2015-11-061-0/+8
| | | | | | * test/lib/zombie_hunter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* set as binary before gsubnaruse2015-10-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_raisenobu2015-10-301-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: refine all_assertionsnobu2015-10-071-2/+12
| | | | | | | * test/lib/test/unit/assertions.rb (all_assertions): refine total failiure message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit/assertions.rb: all_assertionsnobu2015-09-272-13/+32
| | | | | | | * test/lib/test/unit/assertions.rb (all_assertions): try all assertions and check if all passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: mkfifo command based File.mkfifo methodakr2015-09-191-5/+0
| | | | | | | | definition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: File.mkfifonobu2015-09-181-2/+1
| | | | | | | * file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: abort at timeoutnobu2015-08-121-6/+10
| | | | | | | * test/lib/envutil.rb (invoke_ruby): abort at timeout and show the backtrace of the target process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: -w for assert_separatelynobu2015-07-301-1/+1
| | | | | | | * test/lib/envutil.rb (assert_separately): always add -w option for warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: show signalnobu2015-07-271-0/+4
| | | | | | | * test/lib/test/unit.rb (Test::Unit::Parallel::Worker#died): show terminated signal when a worker died. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: suppress warningsnobu2015-07-271-3/+4
| | | | | | | * test/lib/test/unit.rb (MiniTest::Unit::TestCase.test_order): get rid of warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: --test-order optionnobu2015-07-271-0/+12
| | | | | | | * test/lib/test/unit.rb (setup_options): add --test-order option to override the test order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Timeout.timeoutnobu2015-07-131-2/+2
| | | | | | | * time: Object#timeout has been deprecated a long time ago, use Timeout.timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* leakchecker.rb: close consolenobu2015-07-081-3/+3
| | | | | | | * test/lib/leakchecker.rb (LeakChecker#find_fds): close console before find open FDs for each time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e