1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

24 commits

Author SHA1 Message Date
zzak
b8ef79884b * lib/test/: [DOC] Document Test::Unit, hide most submodules and
classes from rdoc. Since lib/test is only present as a compatibility
  layer with the legacy test suite many test/unit users will be using
  minitest or the test/unit gem instead. It is recommended to use one
  of these alternatives for writing new tests.

  This patch was based on a patch submitted by Steve Klabnik.
  [ruby-core:56694] [Bug #8778]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19 17:36:03 +00:00
usa
d07346a102 * lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError
because it's Gem::LoadError sometimes.  see [Bug #6882]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 12:09:19 +00:00
usa
9bb6a05283 * test/unit/test.rb (Test::Unit::ProxyError): new exception class to
wrap exceptions raised in workers in parallel test mode.

* test/unit/parallel.rb (Test::Unit::Worker#puke): use above warpper
  exception.
  [Bug #6882] [ruby-dev:46054]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 01:57:19 +00:00
sorah
5f4b7f5afa * lib/test/unit.rb, lib/test/unit/parallel.rb:
generate error message (String) in parallel.rb instead of
  marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-20 02:07:24 +00:00
naruse
66d0ad3607 Undef on_parallel_worker? before redefine.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 02:11:01 +00:00
naruse
d42df49146 * lib/test/unit/parallel.rb: workaround fix for rubygems.
RubyGems can't find rake if the source directory is not equal to
  the directory which is running the test. [Bug #6604]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-28 20:11:19 +00:00
nobu
bdfd26b795 lib/test/unit/parallel.rb: new method to report to the parent
* lib/test/unit/parallel.rb (Test::Unit::Worker#_report): extract
  method to report to the parent process

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 09:22:01 +00:00
nobu
7ed81c28e0 lib/test/unit: refactoring puke
* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
  drop useless reports, not override entirely.
* lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report
  unformatted results.  formatting messages is not a workers task.
* lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw
  results.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:11:55 +00:00
nobu
95b30b0d07 * lib/test/unit.rb (terminal_width, del_status_line, put_status):
extract as methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29 07:35:38 +00:00
sorah
42b1df08fc * lib/test/unit.rb: Put error message into STDERR if failed to lanch
worker (job) process. [ruby-dev:44802] [Bug #5577]

* lib/test/unit/parallel.rb: If failed to increment_io, exit with code
  2. [ruby-dev:44802] [Bug #5577]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11 08:28:48 +00:00
kazu
7d9fe82be4 * lib/test/unit/parallel.rb: use pack("m0") instead of
pack("m").gsub("\n","").
* lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-02 06:13:29 +00:00
sorah
60da7a36f5 * lib/test/unit.rb (_run_parallel):
New option "--separate" for test/unit; when running tests with this
  option, a job process will be restarted after one testcase has done.
  This means all testcases will run with separated process.

* lib/test/unit/parallel.rb: Fix for above. Now parallel.rb puts
  "ready!" for first ready, "ready" for afters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-25 13:47:21 +00:00
sorah
4c438fd0fe * lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker?
only when $0 == __FILE__.

* lib/test/unit/parallel.rb: Run Test::Unit::Worker.run only when
  $0 == __FILE__.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-19 01:12:02 +00:00
sorah
288c18cdd8 * test/testunit/test_parallel.rb: Fix Regexp for test.
* test/testunit/tests_for_parallel/test_third.rb: Use
  Test::Unit::TestCase#on_parallel_worker? for detecting worker.

* lib/test/unit/testcase.rb(Test::Unit::TestCase#on_parallel_worker?):
  New Method Test::Unit::TestCase#on_parallel_worker? returns true
  when a testcase is running on parallel worker.
* lib/test/unit/parallel.rb(Test::Unit::TestCase#on_parallel_worker?):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 11:24:23 +00:00
sorah
d1a7670baf * lib/test/unit/parallel.rb: Keep $stdin, $stdout before run testcase
and restore after run. Because some test break $stdin, $stdout.
  Fixes [Bug #4433] [ruby-core:35353]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03 11:48:47 +00:00
sorah
6dc0488148 * lib/test/unit/parallel.rb: Never Ignore SIGINT. When received
Interrupt, immediately puts result and exit. [ruby-dev:43571]

* lib/test/unit.rb: When received Interrupt, wait results from workers
and correct them. [ruby-dev:43571]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-23 00:10:49 +00:00
naruse
c85be42589 * lib/test/unit/parallel.rb: remove unused variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-21 21:42:23 +00:00
sorah
31fcc22365 * lib/test/unit/parallel.rb: Fix name from inclement_io to
`increment_io`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 05:29:52 +00:00
sorah
39f90db925 * lib/test/unit/parallel.rb: Fix number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 13:05:17 +00:00
sorah
0a9442983d * lib/test/unit/parallel.rb: For Windows.
* test/testunit/test_parallel.rb(TestParallelWorker#test_quit_in_test):
  Fix for above specification change.
* test/testunit/test_parallel.rb(TestParallel#spawn_runner):
  Fix outputing empty line in running test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 12:54:39 +00:00
nobu
715dc8355c * lib/test/unit.rb, lib/test/unit/parallel.rb: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-26 14:51:35 +00:00
sorah
86c7e68442 * lib/test/unit.rb: --jobs-status won't puts over 2 lines.
* test/testunit/test_parallel.rb: Fix test for above.
* lib/test/*: refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-26 07:17:59 +00:00
sorah
48fa6ed529 * test/testunit/test_parallel.rb, test/testunit/parallel/*:
Test for r30939.
* lib/test/unit.rb: For test.
* lib/test/parallel.rb: For test.
* lib/test/unit/testcase.rb: For test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-23 14:08:25 +00:00
sorah
a790bd0bd7 * lib/test/unit.rb: Add new options; --jobs,-j,--ruby,--jobs-status,
--no-retry.
  [Feature #4415] [ruby-dev:43226],[ruby-dev:43222],[ruby-core:35294]
* lib/test/unit/parallel.rb: Used at test/unit --jobs(-j) option.
* test/csv/test_serialization.rb: test/unit parallel running ready.
* test/rake/test_file_task.rb: test/unit parallel running ready.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-22 03:36:38 +00:00