summaryrefslogtreecommitdiff
path: root/test/lib
AgeCommit message (Collapse)Author
2016-02-17assertions.rb: fix assert_no_memory_leaknobu
* 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
2016-02-05incompatible encoding workaroundnobu
* 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
2016-02-02follow r53691kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29suppress warning: assigned but unused variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-17remove extra dotnobu
* 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
2016-01-05leakchecker.rb: remove temporary measurenobu
* 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
2015-12-20assertions.rb: show failed indexesnobu
* 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
2015-12-19test/unit.rb: color on ttynobu
* 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
2015-12-19test/unit.rb: fix outputsnobu
* 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
2015-12-18test/unit.rb: use full columnsnobu
* 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
2015-12-16Exception#backtrace may be nil if it is manually creatednaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
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
2015-12-14test: use String#b instead of dup.force_encodingnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13* test/lib/envutil.rb: move enutil's assertions under Test::Unit::Assertion.hsbt
* test/lib/test/unit/assertions.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* iseq.c: rename methodsko1
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
2015-12-08envutil.rb: improve messagenobu
* 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
2015-12-08* introduce new ISeq binary format serializer/de-serializerko1
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
2015-12-07* test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.ko1
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
2015-12-05assertions.rb: fallback encoding errornobu
* 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
2015-11-29SIGTERM should be also capturednaruse
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
2015-11-20read may return nilnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06* test/runner.rb: extracted test helper.hsbt
* test/lib/zombie_hunter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30set as binary before gsubnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30use assert_raisenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-07assertions.rb: refine all_assertionsnobu
* 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
2015-09-27test/unit/assertions.rb: all_assertionsnobu
* 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
2015-09-19* test/lib/envutil.rb: mkfifo command based File.mkfifo methodakr
definition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-18file.c: File.mkfifonobu
* 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
2015-08-12envutil.rb: abort at timeoutnobu
* 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
2015-07-30envutil.rb: -w for assert_separatelynobu
* 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
2015-07-27test/unit.rb: show signalnobu
* 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
2015-07-27test/unit.rb: suppress warningsnobu
* 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
2015-07-27test/unit.rb: --test-order optionnobu
* 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
2015-07-13use Timeout.timeoutnobu
* 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
2015-07-08leakchecker.rb: close consolenobu
* 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
2015-07-06* test/lib/memory_status.rb: removed redundant path.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05parallel.rb: upper directorynobu
* test/lib/test/unit/parallel.rb: make @@project_dir one level upper as this file had moved one level deeper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25* test/lib/envutil.rb (Test::Unit::Assertions#assert_no_memory_leak):ngoto
NO_MEMORY_LEAK_ENVS is moved to Memory::NO_MEMORY_LEAK_ENVS to reduce child executions during test-all on Solaris. * test/lib/memory_status.rb (Memory::NO_MEMORY_LEAK_ENVS): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22* test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removedngoto
because it has been meaningless since r36385. [Bug:11288] * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete lines related to the removed start_watchdog method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15envutil.rb: show failure descriptionnobu
* test/lib/envutil.rb (assert_separately): always show failure description. signals are not available on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-15envutil.rb: no signal description iff possiblenobu
* test/lib/envutil.rb (FailDesc): show signal description only if it is available, or nothing if not killed by a signal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/lib/leakchecker.rb (check): refactor.eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/lib/leakchecker.rb: Return false for no leaks.eregon
Otherwise the GC could run for nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13envutil.rb: failure descriptionnobu
* test/lib/envutil.rb (assert_no_memory_leak): show detail failure description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-04* test/lib/envutil.rb (assert_no_memory_leak): change default valueko1
of limit from 1.5 to 2.0. It is ad-hoc fix to solve test failure in travis-ci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-27envutil.rb: EnvUtil.gc_stress_to_classnobu
* test/lib/envutil.rb (EnvUtil.gc_stress_to_class): check if GC.stress_to_class is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17default colorsnobu
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: shared the default colors from test/colors file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17reset colorsnobu
* bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: reset for each colors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-13* test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.akr
* test/ruby/test_io.rb: Ditto. * test/ruby/test_file_exhaustive.rb: Use File.mkfifo. * test/ruby/test_process.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12* test/lib/leakchecker.rb: Check environment variables.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e