summaryrefslogtreecommitdiff
path: root/test/lib
AgeCommit message (Collapse)Author
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
2015-03-04envutil.rb: no need to sleepnobu
* test/lib/envutil.rb (assert_in_out_err): remove sleep to catch the just time, and it is unnecessary as diagnostic_reports waits for 3 seconds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-04envutil.rb: diagnostic_reports for SIGTRAPnobu
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): SIGTRAP also generate diagnostic report file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03* test/lib/envutil.rb (EnvUtil.invoke_ruby): need to rescue becauseusa
Signal.signame may raise exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03envutil.rb: improve by assert_pattern_listnobu
* test/lib/envutil.rb (assert_in_out_err): improve to match by assert_pattern_list if expected result is other than Regexp or String list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02envutil.rb: fix typonobu
* test/lib/envutil.rb (invoke_ruby): fix typo again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02envutil.rb: fix const namenobu
* test/lib/envutil.rb (invoke_ruby): fix an exception class name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02envutil.rb: timeout_error argument to invoke_rubynobu
* test/lib/envutil.rb (invoke_ruby): add `timeout_error` optional keyword argument, the exception class to be raised if the target process timed out. if it is nil, no exception will be raised at timeout but the terminated output, error, and status will be returned. defaulted to Timeout::Error. * test/lib/envutil.rb (assert_separately): check outputs and status (including diagnostic reports) of timed-out process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02envutil.rb: signal list to invoke_rubynobu
* test/lib/envutil.rb (invoke_ruby): allow `signal` optional keyword argument to be a list of signals to be sent to the target process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01envutil.rb: signal argumentnobu
* test/lib/envutil.rb (invoke_ruby): add optional keyword argument of signal to be sent to hung-up process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-09test/unit.rb: regexps to excludenobu
* test/lib/test/unit.rb (ExcludedMethods#exclude_from): allow regexps for methods to be excluded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10test/unit.rb: --excludes-dir listnobu
* test/lib/test/unit.rb (ExcludesOption): allow directory list by PATH_SEPARATOR to --excludes-dir option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04test/unit.rb: ExcludesOptionnobu
* test/lib/test/unit.rb (ExcludesOption): add "excludes" support to test suite, for alternative implementations and platforms. [Feature #10682] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04test/unit.rb: reorder Test::Unitnobu
* test/lib/test/unit.rb (Test::Unit): reorder modules and merge each modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e