summaryrefslogtreecommitdiff
path: root/test/lib
AgeCommit message (Collapse)Author
2017-03-07Supress warning: instance variable @repeat_count not initializednaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02test: use RbConfig::Limitsnobu
* test/lib/envutil.rb: rbconfig/sizeof may not be available when cross-compiling. use RbConfig::Limits instead of calculating limits of Fixnum with hard-coded CHAR_BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20assertions.rb: ignore exit in childnobu
* test/lib/test/unit/assertions.rb (assert_separately): ignore SystemExit. unsuccessful exit still fails an assertion later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20envutil.rb: diagnostic_reports for ruby-runnernobu
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): ruby-runner execs "RUBY_INSTALL_NAME" file, so search by that name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10parallel.rb: fix interventionnobu
* test/lib/test/unit/parallel.rb (_report): send a response and a newline atomically, to get rid of intervention with "p" which runs in a separate thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07test/unit.rb: old GNU makenobu
* test/lib/test/unit.rb (Test::Unit::Parallel#non_options): support old GNU make, which uses --jobserver-fds option instead of --jobserver-auth. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07test/unit.rb: most-assertednobu
* test/lib/test/unit.rb (Statistics#record): record most asserted tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07test/unit.rb: definednobu
* test/lib/test/unit.rb (Test::Unit::Statistics#record): check if @longest is set first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07test/unit: record in parallelnobu
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): deal with record. * test/lib/test/unit/parallel.rb (Test::Unit::Worker#record): report test records to the master. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07test/unit.rb: statisticsnobu
* test/lib/test/unit.rb (Test::Unit::Statistics): show statistics. only --longest option is implemented right now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-05@job_tokens is defined iff @jobserver is truenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04test/unit.rb: jobserver for workersnobu
* test/lib/test/unit.rb (Test::Unit::Parallel#process_args): initialize @run_options to pass jobserver auth pipes to worker processes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04test/unit.rb: job tokensnobu
* test/lib/test/unit.rb (_run_parallel): deal with job tokens for each workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04test/unit.rb: initialize instance variablenobu
* test/lib/test/unit.rb (Test::Unit::Parallel#non_options): initialize @jobserver instance variable to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03test/unit.rb: share job slotsnobu
* test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): share job slots with GNU 'make'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03test/unit.rb: job testing flagnobu
* test/lib/test/unit.rb (Parallel#non_options): split testing flag and job count by OptionParser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28test/unit.rb: minimum workersnobu
* test/lib/test/unit.rb (_run_parallel): launch only necessary workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27leakchecker.rb: get rid of uninitialized Tempfilenobu
* test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of errors on uninitialized Tempfile, which can be left when Dir.tmpdir failed or by Tempfile.allocate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16Fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24test/unit.rb: restore parallel optionnobu
* test/lib/test/unit.rb (_run_parallel): restore parallel option after retrying for --repeat-count option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24test/unit.rb: --subprocess-timeout-scale optionnobu
* test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess timeout scaling factor. * test/lib/test/unit.rb (Test::Unit::SubprocessOption): add --subprocess-timeout-scale option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24test/unit.rb: --repeat-count optionnobu
* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count option to repeat COUNT times while success. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23assertions.rb: prepare_syntax_checknobu
* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract common preparation of arguments from assert_valid_syntax and assert_syntax_error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23assertions.rb: syntax check by iseqnobu
* test/lib/test/unit/assertions.rb (assert_valid_syntax): use RubyVM::InstructionSequence.compile to get rid of executing the code, instead of catch&throw. sample/trick2015/kinaba/entry.rb no longer raises an Invalid return. * test/lib/test/unit/assertions.rb (assert_syntax_error): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20test/unit.rb: separator [ci skip]nobu
* test/lib/test/unit.rb (ExcludesOption#setup_options): add separator for --excludes-dir in help message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08test/unit.rb: fix -n optionnobu
* test/lib/test/unit.rb (non_options): turn name patterns into Regexps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07assertions.rb: defered message in FailDescnobu
* test/lib/test/unit/assertions.rb (FailDesc): allow to defer message generation, as well as other assertion methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05Remove closed checks and use `&.`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-02assertions.rb: assert_all_assertionsnobu
* test/lib/test/unit/assertions.rb (assert_all_assertions): prefix assert to be filtered out. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-28test/unit.rb: no file name if idle [ci skip]nobu
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker#to_s): show file name if not idling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-24test/unit.rb: show idling workersnobu
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): update the job status after a task finished, to show idling workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-08memory_status.c: system callnobu
* ext/-test-/memory_status/memory_status.c: get memory sizes by mach task_info system call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27assertions.rb: success optionnobu
* test/lib/test/unit/assertions.rb (assert_in_out_err): add success option to check the exit status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29assertions.rb: add an alias pend for skiprhe
* test/lib/test/unit/assertions.rb (pend): Add an alias 'pend' for 'skip'. This is required for test-unit compatibility. In particular, ext/openssl uses it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08test/unit.rb: no verbose in worker processesnobu
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker.launch): disable verbose flag in worker processes, get rid of unexpected output within marshaled results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-13* test/lib/test/unit.rb: added test files with `_test` suffix for jsonhsbt
upstream. * test/json: merge original test files from json upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-22-test-/integernobu
* ext/-test-/integer/core_ext.c: move testutil/integer.c. * test/lib/-test-/integer.rb: extract implementation details from test/unit/assertions.rb. [Bug #12408] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19assertions.rb: leave timeout to invoke_rubynobu
* test/lib/test/unit/assertions.rb (assert_separately): leave timeout to invoke_ruby, which handles outputs and status of the target process since r51539. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17[Feature #12005] Unify Fixnum and Bignum into Integerakr
* [Feature #12005] Unify Fixnum and Bignum into Integer * include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums. * insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG. * vm_core.h: Ditto. * vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead of FIXNUM_REDEFINED_OP_FLAG. * vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of rb_cFixnum and rb_cBignum. (C): Use Integer instead of Fixnum and Bignum. * numeric.c (fix_succ): Removed. (Init_Numeric): Define Fixnum as Integer. * bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum. (rb_int_coerce): replaced from rb_big_coerce and return fixnums as-is. (Init_Bignum): Define Bignum as Integer. Don't define ===. * error.c (builtin_class_name): Return "Integer" for fixnums. * sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum. * ext/-test-/testutil: New directory to test. Currently it provides utilities for fixnum and bignum. * ext/json/generator/generator.c: Define mInteger_to_json. * lib/mathn.rb (Fixnum#/): Redefinition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01test/lib/test/unit/assertions.rb defines assert_fixnum and assert_bignum.akr
* test/lib/test/unit/assertions.rb (assert_fixnum): Defined. (assert_bignum): Defined. * test/ruby/test_bignum.rb: Use assert_bignum. * test/ruby/test_integer_comb.rb: Use assert_fixnum and assert_bignum. * test/ruby/test_optimization.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01envutil.rb defines Integer::{FIXNUM_MIN,FIXNUM_MAX}.akr
* test/lib/envutil.rb: Define Integer::{FIXNUM_MIN,FIXNUM_MAX}. * test/ruby/test_bignum.rb: Use Integer::{FIXNUM_MIN,FIXNUM_MAX}. * test/ruby/test_bignum.rb: Ditto. * test/ruby/test_integer_comb.rb: Ditto. * test/ruby/test_marshal.rb: Ditto. * test/ruby/test_optimization.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01* test/lib/test/unit.rb (Options#non_options): fixed wrong regexp.usa
if both positives and negatives were specified, postives had to be spcicifed from the beginning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-20assertions.rb: return the exceptionnobu
* test/lib/test/unit/assertions.rb (assert_syntax_error): return the rescued exception object as well as assert_raise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11test/unit.rb: show warning locationsnobu
* test/lib/test/unit.rb (ExcludedMethods.load): supply the path to show the warning locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-09assertions.rb: set default internal encodingnobu
* test/lib/test/unit/assertions.rb (assert_raise_with_message): set default internal encoding to the excpected message, which affects String#inspect in messages. * test/lib/test/unit/assertions.rb (assert_warning): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22test/unit.rb: defer failures in non-replace modenobu
* 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
2016-03-21test/unit.rb: show crashed filenobu
* 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
2016-03-19test/unit.rb: defer failures in verbose modenobu
* 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
2016-03-17assertions.rb: fix result of assert_nothing_raisednobu
* 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