deep_test_pre 2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +47 -0
- data/README.rdoc +199 -0
- data/Rakefile +137 -0
- data/lib/deep_test.rb +78 -0
- data/lib/deep_test/agent.rb +108 -0
- data/lib/deep_test/central_command.rb +165 -0
- data/lib/deep_test/cpu_info.rb +22 -0
- data/lib/deep_test/database/mysql_setup_listener.rb +112 -0
- data/lib/deep_test/database/setup_listener.rb +116 -0
- data/lib/deep_test/deadlock_detector.rb +7 -0
- data/lib/deep_test/demon.rb +25 -0
- data/lib/deep_test/distributed/beachhead.rb +104 -0
- data/lib/deep_test/distributed/dispatch_controller.rb +60 -0
- data/lib/deep_test/distributed/establish_beachhead.rb +19 -0
- data/lib/deep_test/distributed/filename_resolver.rb +40 -0
- data/lib/deep_test/distributed/landing_fleet.rb +30 -0
- data/lib/deep_test/distributed/landing_ship.rb +60 -0
- data/lib/deep_test/distributed/remote_deployment.rb +56 -0
- data/lib/deep_test/distributed/rsync.rb +50 -0
- data/lib/deep_test/distributed/shell_environment.rb +50 -0
- data/lib/deep_test/distributed/ssh_client_connection_info.rb +14 -0
- data/lib/deep_test/extensions/object_extension.rb +40 -0
- data/lib/deep_test/failure_message.rb +19 -0
- data/lib/deep_test/lib_root.rb +4 -0
- data/lib/deep_test/listener_list.rb +17 -0
- data/lib/deep_test/local_deployment.rb +46 -0
- data/lib/deep_test/logger.rb +32 -0
- data/lib/deep_test/main.rb +41 -0
- data/lib/deep_test/marshallable_exception_wrapper.rb +44 -0
- data/lib/deep_test/metrics/data.rb +34 -0
- data/lib/deep_test/metrics/measurement.rb +39 -0
- data/lib/deep_test/null_listener.rb +62 -0
- data/lib/deep_test/options.rb +113 -0
- data/lib/deep_test/proxy_io.rb +77 -0
- data/lib/deep_test/rake_tasks.rb +13 -0
- data/lib/deep_test/result_reader.rb +40 -0
- data/lib/deep_test/rspec_detector.rb +21 -0
- data/lib/deep_test/spec.rb +17 -0
- data/lib/deep_test/spec/extensions/example_group_methods.rb +64 -0
- data/lib/deep_test/spec/extensions/example_methods.rb +52 -0
- data/lib/deep_test/spec/extensions/options.rb +43 -0
- data/lib/deep_test/spec/extensions/spec_task.rb +21 -0
- data/lib/deep_test/spec/runner.rb +72 -0
- data/lib/deep_test/spec/work_result.rb +35 -0
- data/lib/deep_test/spec/work_unit.rb +59 -0
- data/lib/deep_test/test.rb +10 -0
- data/lib/deep_test/test/extensions/error.rb +14 -0
- data/lib/deep_test/test/run_test_suite.rb +5 -0
- data/lib/deep_test/test/runner.rb +24 -0
- data/lib/deep_test/test/supervised_test_suite.rb +48 -0
- data/lib/deep_test/test/work_result.rb +35 -0
- data/lib/deep_test/test/work_unit.rb +40 -0
- data/lib/deep_test/test_task.rb +47 -0
- data/lib/deep_test/ui/console.rb +74 -0
- data/lib/deep_test/ui/null.rb +17 -0
- data/lib/deep_test/warlock.rb +146 -0
- data/lib/telegraph.rb +29 -0
- data/lib/telegraph/ack_sequence.rb +14 -0
- data/lib/telegraph/logging.rb +20 -0
- data/lib/telegraph/message.rb +39 -0
- data/lib/telegraph/operator.rb +47 -0
- data/lib/telegraph/switchboard.rb +57 -0
- data/lib/telegraph/wire.rb +73 -0
- data/test/deep_test/agent_test.rb +175 -0
- data/test/deep_test/central_command_test.rb +147 -0
- data/test/deep_test/cpu_info_test.rb +33 -0
- data/test/deep_test/database/mysql_setup_listener_test.rb +18 -0
- data/test/deep_test/demon_test.rb +23 -0
- data/test/deep_test/distributed/beachhead_test.rb +67 -0
- data/test/deep_test/distributed/dispatch_controller_test.rb +162 -0
- data/test/deep_test/distributed/filename_resolver_test.rb +56 -0
- data/test/deep_test/distributed/landing_fleet_test.rb +55 -0
- data/test/deep_test/distributed/landing_ship_test.rb +48 -0
- data/test/deep_test/distributed/remote_deployment_test.rb +134 -0
- data/test/deep_test/distributed/rsync_test.rb +47 -0
- data/test/deep_test/distributed/shell_environment_test.rb +108 -0
- data/test/deep_test/distributed/ssh_client_connection_info_test.rb +34 -0
- data/test/deep_test/extensions/object_extension_test.rb +37 -0
- data/test/deep_test/listener_list_test.rb +22 -0
- data/test/deep_test/local_deployment_test.rb +19 -0
- data/test/deep_test/logger_test.rb +38 -0
- data/test/deep_test/main_test.rb +12 -0
- data/test/deep_test/marshallable_exception_wrapper_test.rb +46 -0
- data/test/deep_test/metrics/data_test.rb +22 -0
- data/test/deep_test/metrics/measurement_test.rb +18 -0
- data/test/deep_test/proxy_io_test.rb +104 -0
- data/test/deep_test/result_reader_test.rb +128 -0
- data/test/deep_test/test/extensions/error_test.rb +42 -0
- data/test/deep_test/test/runner_test.rb +11 -0
- data/test/deep_test/test/supervised_test_suite_test.rb +107 -0
- data/test/deep_test/test/work_result_test.rb +85 -0
- data/test/deep_test/test/work_unit_test.rb +63 -0
- data/test/deep_test/test_task_test.rb +15 -0
- data/test/deep_test/ui/console_test.rb +13 -0
- data/test/deep_test/warlock_test.rb +40 -0
- data/test/test_helper.rb +30 -0
- data/test/test_task_test.rb +75 -0
- metadata +156 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../../test_helper"
|
2
|
+
|
3
|
+
module DeepTest
|
4
|
+
module UI
|
5
|
+
unit_tests do
|
6
|
+
test "dispatch_finished doesn't fail if spinner is nil" do
|
7
|
+
assert_nothing_raised do
|
8
|
+
Console.new(:options).dispatch_finished(:method_name)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
module DeepTest
|
4
|
+
unit_tests do
|
5
|
+
test "running? is true if sending kill(0, pid) does not fail" do
|
6
|
+
warlock = Warlock.new Options.new({})
|
7
|
+
Process.expects(:kill).with(0, :pid)
|
8
|
+
assert_equal true, warlock.running?(:pid)
|
9
|
+
end
|
10
|
+
|
11
|
+
test "running? is false if Process.kill(0, pid) raises Errno::ESRCH" do
|
12
|
+
warlock = Warlock.new Options.new({})
|
13
|
+
Process.stubs(:kill).raises(Errno::ESRCH)
|
14
|
+
assert_equal false, warlock.running?(:pid)
|
15
|
+
end
|
16
|
+
|
17
|
+
test "running? is true if Process.kill raises Exception" do
|
18
|
+
warlock = Warlock.new Options.new({})
|
19
|
+
Process.stubs(:kill).raises(Exception)
|
20
|
+
assert_equal true, warlock.running?(:pid)
|
21
|
+
end
|
22
|
+
|
23
|
+
test "demon_count is 0 initially" do
|
24
|
+
assert_equal 0, Warlock.new(Options.new({})).demon_count
|
25
|
+
end
|
26
|
+
|
27
|
+
test "add_demon increases demon_count by 1" do
|
28
|
+
warlock = Warlock.new Options.new({})
|
29
|
+
warlock.send(:add_demon, "name", 1)
|
30
|
+
assert_equal 1, warlock.demon_count
|
31
|
+
end
|
32
|
+
|
33
|
+
test "remove_demon increases demon_count by 1" do
|
34
|
+
warlock = Warlock.new Options.new({})
|
35
|
+
warlock.send(:add_demon, "name", 1)
|
36
|
+
warlock.send(:remove_demon, "name", 1)
|
37
|
+
assert_equal 0, warlock.demon_count
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'dust'
|
4
|
+
require 'mocha'
|
5
|
+
require 'set'
|
6
|
+
|
7
|
+
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + "/../lib")
|
8
|
+
require "deep_test"
|
9
|
+
|
10
|
+
require File.dirname(__FILE__) + "/../infrastructure/load"
|
11
|
+
|
12
|
+
class SomeCustomException < RuntimeError
|
13
|
+
end
|
14
|
+
|
15
|
+
class Test::Unit::TestCase
|
16
|
+
def setup
|
17
|
+
@old_logger = DeepTest.logger
|
18
|
+
DeepTest.logger = TestLogger.new
|
19
|
+
DynamicTeardown.setup
|
20
|
+
end
|
21
|
+
|
22
|
+
def teardown
|
23
|
+
DeepTest.logger = @old_logger if @old_logger
|
24
|
+
DynamicTeardown.teardown
|
25
|
+
end
|
26
|
+
|
27
|
+
def at(time, &block)
|
28
|
+
Timewarp.freeze(time, &block)
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/test_helper"
|
2
|
+
|
3
|
+
module DeepTest
|
4
|
+
unit_tests do
|
5
|
+
test "defines a rake task with the name passed to the constructor" do
|
6
|
+
TestTask.any_instance.stubs(:desc)
|
7
|
+
TestTask.any_instance.expects(:task).with(:my_task_name)
|
8
|
+
TestTask.new :my_task_name do
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
test "setting pattern" do
|
13
|
+
pattern = "test/**/x*_test.rb"
|
14
|
+
task = TestTask.new do |t|
|
15
|
+
t.stubs(:define)
|
16
|
+
t.pattern = pattern
|
17
|
+
end
|
18
|
+
assert_equal pattern, task.pattern[-pattern.size..-1]
|
19
|
+
end
|
20
|
+
|
21
|
+
test "default pattern is test/**/*_test.rb" do
|
22
|
+
task = TestTask.new do |t|
|
23
|
+
t.stubs(:define)
|
24
|
+
end
|
25
|
+
assert_equal "test/**/*_test.rb", task.pattern[-"test/**/*_test.rb".size..-1]
|
26
|
+
end
|
27
|
+
|
28
|
+
test "default libs is ['lib']" do
|
29
|
+
task = TestTask.new do |t|
|
30
|
+
t.stubs(:define)
|
31
|
+
end
|
32
|
+
assert_equal ["lib"], task.libs
|
33
|
+
end
|
34
|
+
|
35
|
+
test "can add to libs" do
|
36
|
+
task = TestTask.new do |t|
|
37
|
+
t.libs << "test"
|
38
|
+
t.stubs(:define)
|
39
|
+
end
|
40
|
+
assert_equal ["lib", "test"], task.libs
|
41
|
+
end
|
42
|
+
|
43
|
+
test "define passes the -I option to the call to ruby" do
|
44
|
+
task = TestTask.new do |t|
|
45
|
+
t.libs << "test"
|
46
|
+
end
|
47
|
+
task.expects(:ruby).with(includes("-Ilib:test"))
|
48
|
+
Rake::Task["deep_test"].instance_variable_get("@actions").last.call
|
49
|
+
end
|
50
|
+
|
51
|
+
test "define does not pass the -I option to the call to ruby if there are no directories to add to the load path" do
|
52
|
+
task = TestTask.new do |t|
|
53
|
+
t.libs = []
|
54
|
+
end
|
55
|
+
task.expects(:ruby).with(Not(includes("-I")))
|
56
|
+
Rake::Task["deep_test"].instance_variable_get("@actions").last.call
|
57
|
+
end
|
58
|
+
|
59
|
+
test "number_of_agents defaults to count from CpuInfo" do
|
60
|
+
task = TestTask.new do |t|
|
61
|
+
t.stubs(:define)
|
62
|
+
end
|
63
|
+
CpuInfo.expects(:new).returns stub(:count => 2)
|
64
|
+
assert_equal 2, task.number_of_agents
|
65
|
+
end
|
66
|
+
|
67
|
+
test "number_of_agents can be set" do
|
68
|
+
task = TestTask.new do |t|
|
69
|
+
t.number_of_agents = 42
|
70
|
+
t.stubs(:define)
|
71
|
+
end
|
72
|
+
assert_equal 42, task.number_of_agents
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: deep_test_pre
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: "2.0"
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- anonymous z, Dan Manges, David Vollbracht
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-07-19 00:00:00 -05:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: DeepTest runs tests in multiple processes.
|
17
|
+
email: daniel.manges@gmail.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.rdoc
|
24
|
+
- CHANGELOG
|
25
|
+
files:
|
26
|
+
- lib/deep_test/agent.rb
|
27
|
+
- lib/deep_test/central_command.rb
|
28
|
+
- lib/deep_test/cpu_info.rb
|
29
|
+
- lib/deep_test/database/mysql_setup_listener.rb
|
30
|
+
- lib/deep_test/database/setup_listener.rb
|
31
|
+
- lib/deep_test/deadlock_detector.rb
|
32
|
+
- lib/deep_test/demon.rb
|
33
|
+
- lib/deep_test/distributed/beachhead.rb
|
34
|
+
- lib/deep_test/distributed/dispatch_controller.rb
|
35
|
+
- lib/deep_test/distributed/establish_beachhead.rb
|
36
|
+
- lib/deep_test/distributed/filename_resolver.rb
|
37
|
+
- lib/deep_test/distributed/landing_fleet.rb
|
38
|
+
- lib/deep_test/distributed/landing_ship.rb
|
39
|
+
- lib/deep_test/distributed/remote_deployment.rb
|
40
|
+
- lib/deep_test/distributed/rsync.rb
|
41
|
+
- lib/deep_test/distributed/shell_environment.rb
|
42
|
+
- lib/deep_test/distributed/ssh_client_connection_info.rb
|
43
|
+
- lib/deep_test/extensions/object_extension.rb
|
44
|
+
- lib/deep_test/failure_message.rb
|
45
|
+
- lib/deep_test/lib_root.rb
|
46
|
+
- lib/deep_test/listener_list.rb
|
47
|
+
- lib/deep_test/local_deployment.rb
|
48
|
+
- lib/deep_test/logger.rb
|
49
|
+
- lib/deep_test/main.rb
|
50
|
+
- lib/deep_test/marshallable_exception_wrapper.rb
|
51
|
+
- lib/deep_test/metrics/data.rb
|
52
|
+
- lib/deep_test/metrics/measurement.rb
|
53
|
+
- lib/deep_test/null_listener.rb
|
54
|
+
- lib/deep_test/options.rb
|
55
|
+
- lib/deep_test/proxy_io.rb
|
56
|
+
- lib/deep_test/rake_tasks.rb
|
57
|
+
- lib/deep_test/result_reader.rb
|
58
|
+
- lib/deep_test/rspec_detector.rb
|
59
|
+
- lib/deep_test/spec/extensions/example_group_methods.rb
|
60
|
+
- lib/deep_test/spec/extensions/example_methods.rb
|
61
|
+
- lib/deep_test/spec/extensions/options.rb
|
62
|
+
- lib/deep_test/spec/extensions/spec_task.rb
|
63
|
+
- lib/deep_test/spec/runner.rb
|
64
|
+
- lib/deep_test/spec/work_result.rb
|
65
|
+
- lib/deep_test/spec/work_unit.rb
|
66
|
+
- lib/deep_test/spec.rb
|
67
|
+
- lib/deep_test/test/extensions/error.rb
|
68
|
+
- lib/deep_test/test/run_test_suite.rb
|
69
|
+
- lib/deep_test/test/runner.rb
|
70
|
+
- lib/deep_test/test/supervised_test_suite.rb
|
71
|
+
- lib/deep_test/test/work_result.rb
|
72
|
+
- lib/deep_test/test/work_unit.rb
|
73
|
+
- lib/deep_test/test.rb
|
74
|
+
- lib/deep_test/test_task.rb
|
75
|
+
- lib/deep_test/ui/console.rb
|
76
|
+
- lib/deep_test/ui/null.rb
|
77
|
+
- lib/deep_test/warlock.rb
|
78
|
+
- lib/deep_test.rb
|
79
|
+
- lib/telegraph/ack_sequence.rb
|
80
|
+
- lib/telegraph/logging.rb
|
81
|
+
- lib/telegraph/message.rb
|
82
|
+
- lib/telegraph/operator.rb
|
83
|
+
- lib/telegraph/switchboard.rb
|
84
|
+
- lib/telegraph/wire.rb
|
85
|
+
- lib/telegraph.rb
|
86
|
+
- test/deep_test/agent_test.rb
|
87
|
+
- test/deep_test/central_command_test.rb
|
88
|
+
- test/deep_test/cpu_info_test.rb
|
89
|
+
- test/deep_test/database/mysql_setup_listener_test.rb
|
90
|
+
- test/deep_test/demon_test.rb
|
91
|
+
- test/deep_test/distributed/beachhead_test.rb
|
92
|
+
- test/deep_test/distributed/dispatch_controller_test.rb
|
93
|
+
- test/deep_test/distributed/filename_resolver_test.rb
|
94
|
+
- test/deep_test/distributed/landing_fleet_test.rb
|
95
|
+
- test/deep_test/distributed/landing_ship_test.rb
|
96
|
+
- test/deep_test/distributed/remote_deployment_test.rb
|
97
|
+
- test/deep_test/distributed/rsync_test.rb
|
98
|
+
- test/deep_test/distributed/shell_environment_test.rb
|
99
|
+
- test/deep_test/distributed/ssh_client_connection_info_test.rb
|
100
|
+
- test/deep_test/extensions/object_extension_test.rb
|
101
|
+
- test/deep_test/listener_list_test.rb
|
102
|
+
- test/deep_test/local_deployment_test.rb
|
103
|
+
- test/deep_test/logger_test.rb
|
104
|
+
- test/deep_test/main_test.rb
|
105
|
+
- test/deep_test/marshallable_exception_wrapper_test.rb
|
106
|
+
- test/deep_test/metrics/data_test.rb
|
107
|
+
- test/deep_test/metrics/measurement_test.rb
|
108
|
+
- test/deep_test/proxy_io_test.rb
|
109
|
+
- test/deep_test/result_reader_test.rb
|
110
|
+
- test/deep_test/test/extensions/error_test.rb
|
111
|
+
- test/deep_test/test/runner_test.rb
|
112
|
+
- test/deep_test/test/supervised_test_suite_test.rb
|
113
|
+
- test/deep_test/test/work_result_test.rb
|
114
|
+
- test/deep_test/test/work_unit_test.rb
|
115
|
+
- test/deep_test/test_task_test.rb
|
116
|
+
- test/deep_test/ui/console_test.rb
|
117
|
+
- test/deep_test/warlock_test.rb
|
118
|
+
- test/test_helper.rb
|
119
|
+
- test/test_task_test.rb
|
120
|
+
- README.rdoc
|
121
|
+
- CHANGELOG
|
122
|
+
- Rakefile
|
123
|
+
has_rdoc: true
|
124
|
+
homepage: http://deep-test.rubyforge.org
|
125
|
+
licenses: []
|
126
|
+
|
127
|
+
post_install_message:
|
128
|
+
rdoc_options:
|
129
|
+
- --title
|
130
|
+
- DeepTest
|
131
|
+
- --main
|
132
|
+
- README.rdoc
|
133
|
+
- --line-numbers
|
134
|
+
require_paths:
|
135
|
+
- lib
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - ">="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: "0"
|
141
|
+
version:
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: "0"
|
147
|
+
version:
|
148
|
+
requirements: []
|
149
|
+
|
150
|
+
rubyforge_project: deep-test
|
151
|
+
rubygems_version: 1.3.5
|
152
|
+
signing_key:
|
153
|
+
specification_version: 3
|
154
|
+
summary: DeepTest runs tests in multiple processes.
|
155
|
+
test_files: []
|
156
|
+
|