Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
hsbt d5f86e836f Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-20 11:10:37 +00:00
nobu 76be4743ba test_rubyoptions.rb: ruby-runner sets $0 to install name now
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-30 11:59:26 +00:00
ko1 7d52ed594e use timeout scale.
* test/lib/envutil.rb: introduce EnvUtil.apply_timeout_scale to use
  this scale from outside.

* test/ruby/test_thread.rb (test_fork_in_thread): respect timeout scale.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-25 23:43:33 +00:00
nobu 04eb385192 envutil.rb: basename for diagnostic_reports
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): diagnostic
  report file uses base name only.  [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 04:16:02 +00:00
nobu 033c4a083d test: use RbConfig::Limits
* 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-03-02 04:54:19 +00:00
nobu fca3cf6637 envutil.rb: diagnostic_reports for ruby-runner
* 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-20 02:16:22 +00:00
nobu 52acc428f0 test/unit.rb: --subprocess-timeout-scale option
* 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-24 00:51:01 +00:00
kazu b1272e93eb Remove closed checks and use `&.`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05 12:35:03 +00:00
akr de2f7416d2 envutil.rb defines Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* 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 15:16:17 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
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-16 05:07:31 +00:00
hsbt 0d5d742b32 * test/lib/envutil.rb: move enutil's assertions under Test::Unit::Assertion.
* 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-13 10:54:30 +00:00
nobu f679a6b106 envutil.rb: improve message
* 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 16:17:17 +00:00
naruse 42225163c1 SIGTERM should be also captured
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-29 11:45:59 +00:00
naruse b3602a5453 set as binary before gsub
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30 07:01:36 +00:00
nobu 71730b4243 test/unit/assertions.rb: all_assertions
* 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-27 06:35:10 +00:00
akr c748ac9893 * test/lib/envutil.rb: mkfifo command based File.mkfifo method
definition removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-19 17:18:49 +00:00
nobu 9289515562 file.c: File.mkfifo
* 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-09-18 11:11:14 +00:00
nobu bac6ef1b87 envutil.rb: abort at timeout
* 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-08-12 03:50:59 +00:00
nobu fbc4d07087 envutil.rb: -w for assert_separately
* 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-30 04:33:00 +00:00
ngoto 8ffefcb621 * test/lib/envutil.rb (Test::Unit::Assertions#assert_no_memory_leak):
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-25 09:35:46 +00:00
nobu 23f371fd19 envutil.rb: show failure description
* 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-15 01:52:00 +00:00
nobu 5c5b2505a1 envutil.rb: no signal description iff possible
* 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-15 01:51:49 +00:00
nobu 37055f9da0 envutil.rb: failure description
* 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-13 00:19:10 +00:00
ko1 99ee18afcb * test/lib/envutil.rb (assert_no_memory_leak): change default value
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-06-04 17:21:24 +00:00
nobu 2df5bb9ac1 envutil.rb: EnvUtil.gc_stress_to_class
* 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-27 08:02:20 +00:00
akr 3024fc235a * test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.
* 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-04-13 13:46:10 +00:00
nobu 83a27c8703 envutil.rb: no need to sleep
* 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-04 01:22:01 +00:00
nobu 49117ae29a envutil.rb: diagnostic_reports for SIGTRAP
* 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-04 00:24:06 +00:00
usa f73aefc627 * test/lib/envutil.rb (EnvUtil.invoke_ruby): need to rescue because
Signal.signame may raise exception.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03 13:26:40 +00:00
nobu f73a92e46b envutil.rb: improve by assert_pattern_list
* 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-03 08:19:39 +00:00
nobu 89333366a0 envutil.rb: fix typo
* 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-02 07:54:30 +00:00
nobu 4a0e9c5cce envutil.rb: fix const name
* 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-02 07:20:13 +00:00
nobu 7be21a316f envutil.rb: timeout_error argument to invoke_ruby
* 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-02 06:44:34 +00:00
nobu 876d664069 envutil.rb: signal list to invoke_ruby
* 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-02 06:44:22 +00:00
nobu e961fcd528 envutil.rb: signal argument
* 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-03-01 11:21:40 +00:00
nobu a88e787277 envutil.rb: kill pgroup
* test/lib/envutil.rb (invoke_ruby): kill whole group when :pgroup
  option is set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-11 13:54:02 +00:00
nobu 97cfffcdc6 envutil.rb: skip if load failed
* test/lib/envutil.rb (assert_no_memory_leak): skip when failed to
  load fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 03:42:32 +00:00
akr fb2008a73a * test/lib/envutil.rb: Moved from test/ruby/.
* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:05:37 +00:00