r2corba 1.5.5-universal-java → 1.6.0-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/corba.rb +1 -1
- data/lib/corba/cbase/ORB.rb +19 -16
- data/lib/corba/cbase/Request.rb +3 -3
- data/lib/corba/cbase/Values.rb +4 -2
- data/lib/corba/cbase/exception.rb +4 -2
- data/lib/corba/cbase/poa.rb +1 -1
- data/lib/corba/cbase/policies.rb +1 -1
- data/lib/corba/cbase/require.rb +8 -1
- data/lib/corba/common/Any.rb +2 -1
- data/lib/corba/common/IDL.rb +1 -1
- data/lib/corba/common/ORB.rb +21 -21
- data/lib/corba/common/Object.rb +14 -13
- data/lib/corba/common/Servant.rb +4 -4
- data/lib/corba/common/Stub.rb +6 -6
- data/lib/corba/common/Typecode.rb +35 -8
- data/lib/corba/common/Union.rb +5 -0
- data/lib/corba/common/Values.rb +1 -0
- data/lib/corba/common/const.rb +1 -1
- data/lib/corba/common/exception.rb +2 -1
- data/lib/corba/common/version.rb +2 -2
- data/lib/corba/idl/IDL.rb +1 -1
- data/lib/corba/jbase/Any.rb +6 -4
- data/lib/corba/jbase/ORB.rb +2 -2
- data/lib/corba/jbase/Object.rb +13 -13
- data/lib/corba/jbase/Request.rb +3 -3
- data/lib/corba/jbase/Streams.rb +64 -0
- data/lib/corba/jbase/Typecode.rb +3 -2
- data/lib/corba/jbase/Values.rb +2 -0
- data/lib/corba/jbase/exception.rb +1 -0
- data/lib/corba/jbase/poa.rb +18 -18
- data/lib/corba/jbase/policies.rb +29 -29
- data/lib/corba/jbase/require.rb +4 -0
- data/lib/corba/svcs/ins/cos_naming.rb +10 -1
- data/lib/corba/svcs/ins/ins.rb +45 -45
- data/lib/corba/svcs/ins/naming_service.rb +6 -6
- data/lib/ridlbe/ruby/config.rb +27 -20
- data/lib/ridlbe/ruby/walker.rb +276 -253
- data/mkrf_conf_bingem.rb +4 -4
- data/rakelib/build.rake +1 -1
- data/rakelib/config.rake +1 -1
- data/rakelib/config.rb +9 -9
- data/rakelib/gem.rake +20 -20
- data/rakelib/gem.rb +1 -1
- data/rakelib/package.rake +1 -1
- data/test/BiDirectional/client.rb +16 -16
- data/test/BiDirectional/run_test.rb +10 -10
- data/test/BiDirectional/server.rb +20 -20
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +14 -14
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +12 -12
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +17 -17
- data/test/CORBA_Services/Naming/Corbaname/client.rb +14 -14
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +12 -12
- data/test/CORBA_Services/Naming/Corbaname/server.rb +20 -20
- data/test/CORBA_Services/Naming/Simple/client.rb +14 -14
- data/test/CORBA_Services/Naming/Simple/run_test.rb +12 -12
- data/test/CORBA_Services/Naming/Simple/server.rb +17 -17
- data/test/Collocation/run_test.rb +10 -10
- data/test/Collocation/test.rb +26 -19
- data/test/Connect_Timeout/client.rb +15 -15
- data/test/Connect_Timeout/run_test.rb +10 -10
- data/test/DII/client.rb +27 -27
- data/test/DII/run_test.rb +10 -10
- data/test/DII/server.rb +15 -15
- data/test/DSI/client.rb +15 -15
- data/test/DSI/run_test.rb +10 -10
- data/test/DSI/server.rb +16 -16
- data/test/Exceptions/client.rb +19 -19
- data/test/Exceptions/run_test.rb +10 -10
- data/test/Exceptions/server.rb +15 -15
- data/test/Hello/client.rb +15 -15
- data/test/Hello/run_test.rb +10 -10
- data/test/Hello/server.rb +16 -16
- data/test/IDL_Test/client.rb +20 -20
- data/test/IDL_Test/run_test.rb +10 -10
- data/test/IDL_Test/server.rb +18 -18
- data/test/IORMap/client.rb +14 -14
- data/test/IORMap/run_test.rb +10 -10
- data/test/IORMap/server.rb +22 -22
- data/test/IORTable/client.rb +14 -14
- data/test/IORTable/run_test.rb +10 -10
- data/test/IORTable/server.rb +22 -22
- data/test/Implicit_Conversion/client.rb +19 -16
- data/test/Implicit_Conversion/run_test.rb +10 -10
- data/test/Implicit_Conversion/server.rb +15 -15
- data/test/Multi_Threading/Multiple_ORB/client.rb +13 -13
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +10 -10
- data/test/Multi_Threading/Multiple_ORB/server.rb +16 -16
- data/test/Multi_Threading/Simple/client.rb +15 -15
- data/test/Multi_Threading/Simple/run_test.rb +10 -10
- data/test/Multi_Threading/Simple/server.rb +15 -15
- data/test/Multi_Threading/Threads/client.rb +15 -15
- data/test/Multi_Threading/Threads/run_test.rb +10 -10
- data/test/Multi_Threading/Threads/server.rb +17 -17
- data/test/Multi_Threading/Threads/watchdog.rb +15 -15
- data/test/Multiple_Servant_Interfaces/client.rb +13 -13
- data/test/Multiple_Servant_Interfaces/run_test.rb +10 -10
- data/test/Multiple_Servant_Interfaces/server.rb +17 -17
- data/test/Nil/run_test.rb +10 -10
- data/test/Nil/test.rb +13 -13
- data/test/OBV/AbstractInterface/client.rb +13 -13
- data/test/OBV/AbstractInterface/run_test.rb +10 -10
- data/test/OBV/AbstractInterface/server.rb +19 -18
- data/test/OBV/Custom/OBV_impl.rb +2 -0
- data/test/OBV/Custom/client.rb +13 -13
- data/test/OBV/Custom/run_test.rb +10 -10
- data/test/OBV/Custom/server.rb +15 -15
- data/test/OBV/Simple/OBV_impl.rb +1 -0
- data/test/OBV/Simple/client.rb +13 -13
- data/test/OBV/Simple/run_test.rb +10 -10
- data/test/OBV/Simple/server.rb +15 -15
- data/test/OBV/Simple_Event/Event_impl.rb +1 -0
- data/test/OBV/Simple_Event/client.rb +13 -13
- data/test/OBV/Simple_Event/run_test.rb +10 -10
- data/test/OBV/Simple_Event/server.rb +15 -15
- data/test/OBV/Supports/client.rb +18 -18
- data/test/OBV/Supports/run_test.rb +10 -10
- data/test/OBV/Supports/server.rb +14 -14
- data/test/OBV/Supports/supports_impl.rb +3 -0
- data/test/OBV/Tree/client.rb +13 -13
- data/test/OBV/Tree/run_test.rb +10 -10
- data/test/OBV/Tree/server.rb +18 -18
- data/test/OBV/Truncatable/client.rb +56 -56
- data/test/OBV/Truncatable/run_test.rb +10 -10
- data/test/OBV/Truncatable/server.rb +14 -14
- data/test/OBV/ValueBox/client.rb +148 -147
- data/test/OBV/ValueBox/run_test.rb +10 -10
- data/test/OBV/ValueBox/server.rb +15 -15
- data/test/Object/client.rb +13 -13
- data/test/Object/run_test.rb +10 -10
- data/test/Object/server.rb +18 -18
- data/test/POA/run_test.rb +10 -10
- data/test/POA/test.rb +15 -15
- data/test/Param_Test/client.rb +47 -47
- data/test/Param_Test/run_test.rb +10 -10
- data/test/Param_Test/server.rb +55 -55
- data/test/Performance/Simple/client.rb +15 -15
- data/test/Performance/Simple/run_test.rb +10 -10
- data/test/Performance/Simple/server.rb +15 -15
- data/test/Policies/run_test.rb +10 -10
- data/test/Policies/test.rb +23 -23
- data/test/Timeout/client.rb +17 -17
- data/test/Timeout/run_test.rb +10 -10
- data/test/Timeout/server.rb +18 -18
- data/test/lib/test.rb +13 -7
- data/test/test_runner.rb +19 -19
- metadata +6 -6
data/test/Policies/test.rb
CHANGED
@@ -22,19 +22,19 @@ ARGV.options do |opts|
|
|
22
22
|
script_name = File.basename($0)
|
23
23
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
24
24
|
|
25
|
-
opts.separator
|
25
|
+
opts.separator ''
|
26
26
|
|
27
|
-
opts.on(
|
28
|
-
|
29
|
-
|
30
|
-
opts.on(
|
31
|
-
|
32
|
-
|
27
|
+
opts.on('--d LVL',
|
28
|
+
'Set ORBDebugLevel value.',
|
29
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
30
|
+
opts.on('--use-implement',
|
31
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
32
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
33
33
|
|
34
|
-
opts.separator
|
34
|
+
opts.separator ''
|
35
35
|
|
36
|
-
opts.on(
|
37
|
-
|
36
|
+
opts.on('-h', '--help',
|
37
|
+
'Show this help message.') { puts opts; exit }
|
38
38
|
|
39
39
|
opts.parse!
|
40
40
|
end
|
@@ -53,24 +53,24 @@ class MyHello < POA::Test::Hello
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def get_string()
|
56
|
-
|
56
|
+
'Hello there!'
|
57
57
|
end
|
58
58
|
|
59
59
|
def shutdown()
|
60
60
|
@orb.shutdown()
|
61
61
|
end
|
62
|
-
end #of servant MyHello
|
62
|
+
end # of servant MyHello
|
63
63
|
|
64
64
|
if defined?(JRUBY_VERSION)
|
65
65
|
## JacORB needs explicit activation of this option
|
66
66
|
props = {
|
67
|
-
|
68
|
-
|
67
|
+
'org.omg.PortableInterceptor.ORBInitializerClass.bidir_init' =>
|
68
|
+
'org.jacorb.orb.giop.BiDirConnectionInitializer'
|
69
69
|
}
|
70
70
|
else
|
71
71
|
props = {}
|
72
72
|
end
|
73
|
-
orb = CORBA.ORB_init([
|
73
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB', props)
|
74
74
|
|
75
75
|
begin
|
76
76
|
|
@@ -81,31 +81,31 @@ begin
|
|
81
81
|
assert_not 'Failed to resolve RootPOA', CORBA.is_nil(rootpoa) || !rootpoa.is_a?(PortableServer::POA)
|
82
82
|
|
83
83
|
pol = rootpoa.create_thread_policy(PortableServer::SINGLE_THREAD_MODEL)
|
84
|
-
assert 'Failed to create correct policy'
|
84
|
+
assert 'Failed to create correct policy',
|
85
85
|
!pol.nil? and pol.is_a?(PortableServer::ThreadPolicy) and pol.value == PortableServer::SINGLE_THREAD_MODEL
|
86
86
|
|
87
87
|
pol = rootpoa.create_lifespan_policy(PortableServer::PERSISTENT)
|
88
|
-
assert 'Failed to create correct policy'
|
88
|
+
assert 'Failed to create correct policy',
|
89
89
|
!pol.nil? and pol.is_a?(PortableServer::LifespanPolicy) and pol.value == PortableServer::PERSISTENT
|
90
90
|
|
91
91
|
pol = rootpoa.create_id_uniqueness_policy(PortableServer::UNIQUE_ID)
|
92
|
-
assert 'Failed to create correct policy'
|
92
|
+
assert 'Failed to create correct policy',
|
93
93
|
!pol.nil? and pol.is_a?(PortableServer::IdUniquenessPolicy) and pol.value == PortableServer::UNIQUE_ID
|
94
94
|
|
95
95
|
pol = rootpoa.create_id_assignment_policy(PortableServer::USER_ID)
|
96
|
-
assert 'Failed to create correct policy'
|
96
|
+
assert 'Failed to create correct policy',
|
97
97
|
!pol.nil? and pol.is_a?(PortableServer::IdAssignmentPolicy) and pol.value == PortableServer::USER_ID
|
98
98
|
|
99
99
|
pol = rootpoa.create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION)
|
100
|
-
assert 'Failed to create correct policy'
|
100
|
+
assert 'Failed to create correct policy',
|
101
101
|
!pol.nil? and pol.is_a?(PortableServer::ImplicitActivationPolicy) and pol.value == PortableServer::NO_IMPLICIT_ACTIVATION
|
102
102
|
|
103
103
|
pol = rootpoa.create_servant_retention_policy(PortableServer::RETAIN)
|
104
|
-
assert 'Failed to create correct policy'
|
104
|
+
assert 'Failed to create correct policy',
|
105
105
|
!pol.nil? and pol.is_a?(PortableServer::ServantRetentionPolicy) and pol.value == PortableServer::RETAIN
|
106
106
|
|
107
107
|
pol = rootpoa.create_request_processing_policy(PortableServer::USE_DEFAULT_SERVANT)
|
108
|
-
assert 'Failed to create correct policy'
|
108
|
+
assert 'Failed to create correct policy',
|
109
109
|
!pol.nil? and pol.is_a?(PortableServer::RequestProcessingPolicy) and pol.value == PortableServer::USE_DEFAULT_SERVANT
|
110
110
|
|
111
111
|
assert_except('orb.create_policy should have thrown a PolicyError',
|
@@ -113,7 +113,7 @@ begin
|
|
113
113
|
|
114
114
|
pol = orb.create_policy(BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
|
115
115
|
CORBA::Any.to_any(BiDirPolicy::BOTH, BiDirPolicy::BidirectionalPolicyValue._tc))
|
116
|
-
assert 'Failed to create correct policy'
|
116
|
+
assert 'Failed to create correct policy',
|
117
117
|
!pol.nil? and pol.is_a?(BiDirPolicy) and pol.value == BiDirPolicy::BOTH
|
118
118
|
|
119
119
|
poa_man = rootpoa.the_POAManager
|
data/test/Timeout/client.rb
CHANGED
@@ -23,22 +23,22 @@ ARGV.options do |opts|
|
|
23
23
|
script_name = File.basename($0)
|
24
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
25
|
|
26
|
-
opts.separator
|
26
|
+
opts.separator ''
|
27
27
|
|
28
|
-
opts.on(
|
29
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
30
|
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
34
|
-
opts.on(
|
35
|
-
|
36
|
-
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0', Integer) { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
37
37
|
|
38
|
-
opts.separator
|
38
|
+
opts.separator ''
|
39
39
|
|
40
|
-
opts.on(
|
41
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
42
42
|
|
43
43
|
opts.parse!
|
44
44
|
end
|
@@ -55,7 +55,7 @@ Min_timeout = 0
|
|
55
55
|
Max_timeout = 20
|
56
56
|
|
57
57
|
None, Orb1, Thread1, Object1 = (0..3).to_a
|
58
|
-
To_type_names = [
|
58
|
+
To_type_names = ['none', 'orb', 'thread', 'object']
|
59
59
|
|
60
60
|
Timeout_count = [0, 0, 0, 0]
|
61
61
|
In_time_count = [0, 0, 0, 0]
|
@@ -69,7 +69,7 @@ def send_echo (ctype, orb, server, t)
|
|
69
69
|
Timeout_count[ctype] += 1
|
70
70
|
|
71
71
|
# Trap this exception and continue...
|
72
|
-
puts
|
72
|
+
puts '==> Trapped a TIMEOUT exception (expected)'
|
73
73
|
|
74
74
|
# Sleep so the server can send the reply...
|
75
75
|
tv = Max_timeout / 1000.0 # max_timeout is in msec, so get seconds
|
@@ -82,12 +82,12 @@ def send_echo (ctype, orb, server, t)
|
|
82
82
|
# This is a non-standard TAO call that's used to give the
|
83
83
|
# client ORB a chance to cleanup the reply that's come back
|
84
84
|
# from the server.
|
85
|
-
#orb.run(tv)
|
85
|
+
# orb.run(tv)
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
89
|
|
90
|
-
orb = CORBA.ORB_init([
|
90
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
91
91
|
|
92
92
|
begin
|
93
93
|
|
@@ -129,7 +129,7 @@ begin
|
|
129
129
|
puts "client (#{Process.pid}) testing from #{Min_timeout} to #{Max_timeout} milliseconds"
|
130
130
|
|
131
131
|
for t in Min_timeout...Max_timeout
|
132
|
-
puts
|
132
|
+
puts ''
|
133
133
|
puts "client (#{Process.pid}) ================================"
|
134
134
|
puts "client (#{Process.pid}) Trying with timeout = #{t} msec"
|
135
135
|
|
data/test/Timeout/run_test.rb
CHANGED
@@ -20,19 +20,19 @@ ARGV.options do |opts|
|
|
20
20
|
script_name = File.basename($0)
|
21
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
22
22
|
|
23
|
-
opts.separator
|
23
|
+
opts.separator ''
|
24
24
|
|
25
|
-
opts.on(
|
26
|
-
|
27
|
-
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
31
31
|
|
32
|
-
opts.separator
|
32
|
+
opts.separator ''
|
33
33
|
|
34
|
-
opts.on(
|
35
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
36
36
|
|
37
37
|
opts.parse!
|
38
38
|
end
|
data/test/Timeout/server.rb
CHANGED
@@ -22,25 +22,25 @@ ARGV.options do |opts|
|
|
22
22
|
script_name = File.basename($0)
|
23
23
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
24
24
|
|
25
|
-
opts.separator
|
25
|
+
opts.separator ''
|
26
26
|
|
27
|
-
opts.on(
|
28
|
-
|
27
|
+
opts.on('--o IORFILE',
|
28
|
+
'Set IOR filename.',
|
29
29
|
"Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
|
30
|
-
opts.on(
|
31
|
-
|
32
|
-
|
33
|
-
opts.on(
|
34
|
-
|
35
|
-
|
36
|
-
opts.on(
|
37
|
-
|
38
|
-
|
30
|
+
opts.on('--d LVL',
|
31
|
+
'Set ORBDebugLevel value.',
|
32
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
33
|
+
opts.on('--use-implement',
|
34
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
35
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
36
|
+
opts.on('--i ITERATIONS',
|
37
|
+
'Set number of iterations.',
|
38
|
+
'Default: 10', Integer) { |v| OPTIONS[:iter_num] = v }
|
39
39
|
|
40
|
-
opts.separator
|
40
|
+
opts.separator ''
|
41
41
|
|
42
|
-
opts.on(
|
43
|
-
|
42
|
+
opts.on('-h', '--help',
|
43
|
+
'Show this help message.') { puts opts; exit }
|
44
44
|
|
45
45
|
opts.parse!
|
46
46
|
end
|
@@ -74,9 +74,9 @@ class Simple_Server_i < POA::Simple_Server
|
|
74
74
|
puts "server (#{Process.pid}) received shutdown request from client"
|
75
75
|
@orb.shutdown()
|
76
76
|
end
|
77
|
-
end #of servant Simple_Server_i
|
77
|
+
end # of servant Simple_Server_i
|
78
78
|
|
79
|
-
orb = CORBA.ORB_init([
|
79
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
80
80
|
|
81
81
|
obj = orb.resolve_initial_references('RootPOA')
|
82
82
|
|
@@ -97,7 +97,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
97
97
|
}
|
98
98
|
|
99
99
|
Signal.trap('INT') do
|
100
|
-
puts
|
100
|
+
puts 'SIGINT - shutting down ORB...'
|
101
101
|
orb.shutdown()
|
102
102
|
end
|
103
103
|
|
data/test/lib/test.rb
CHANGED
@@ -160,7 +160,7 @@ if defined?(JRUBY_VERSION)
|
|
160
160
|
begin
|
161
161
|
tmp, status = ::Process.waitpid2(pid, ::Process::WNOHANG)
|
162
162
|
if tmp == pid and status.success? != nil
|
163
|
-
return [pid, status.success?() ? 0 : status.exitstatus
|
163
|
+
return [pid, status.success?() ? 0 : status.exitstatus]
|
164
164
|
end
|
165
165
|
return [nil, 0]
|
166
166
|
rescue Errno::ECHILD
|
@@ -185,6 +185,7 @@ if defined?(JRUBY_VERSION)
|
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
188
|
+
|
188
189
|
def initialize(cmd_, arg_)
|
189
190
|
@pid = nil
|
190
191
|
@exitstatus = nil
|
@@ -237,6 +238,7 @@ if defined?(JRUBY_VERSION)
|
|
237
238
|
end
|
238
239
|
|
239
240
|
def is_running?; @exitstatus.nil?; end
|
241
|
+
|
240
242
|
def has_error? ; @trd.status.nil? or (!self.is_running? and self.exitstatus != 0) ;end
|
241
243
|
|
242
244
|
def stop
|
@@ -264,7 +266,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
|
|
264
266
|
|
265
267
|
protected
|
266
268
|
# Used by Process.create
|
267
|
-
ProcessInfo = Struct.new(
|
269
|
+
ProcessInfo = Struct.new('ProcessInfo',
|
268
270
|
:process_handle,
|
269
271
|
:thread_handle,
|
270
272
|
:process_id,
|
@@ -305,7 +307,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
|
|
305
307
|
)
|
306
308
|
|
307
309
|
unless bool
|
308
|
-
raise ProcessError,
|
310
|
+
raise ProcessError, 'CreateProcess() failed: ', get_last_error
|
309
311
|
end
|
310
312
|
|
311
313
|
ProcessInfo.new(
|
@@ -324,7 +326,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
|
|
324
326
|
else
|
325
327
|
CloseHandle(pi_.process_handle) unless pi_.process_handle == INVALID_HANDLE_VALUE
|
326
328
|
pi_.process_handle = INVALID_HANDLE_VALUE
|
327
|
-
raise ProcessError,
|
329
|
+
raise ProcessError, 'GetExitCodeProcess failed: ', get_last_error
|
328
330
|
end
|
329
331
|
end
|
330
332
|
|
@@ -395,6 +397,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
|
|
395
397
|
def exitstatus; @exitstatus; end
|
396
398
|
|
397
399
|
def is_running?; @exitstatus.nil?; end
|
400
|
+
|
398
401
|
def has_error?; !@exitstatus.nil? and (@exitstatus != 0); end
|
399
402
|
|
400
403
|
def stop
|
@@ -457,6 +460,7 @@ else # !win32
|
|
457
460
|
end
|
458
461
|
|
459
462
|
def is_running?; @exitstatus.nil?; end
|
463
|
+
|
460
464
|
def has_error?; !@status.nil? and (@status.success? == false); end
|
461
465
|
|
462
466
|
def stop
|
@@ -472,7 +476,7 @@ end
|
|
472
476
|
class Test
|
473
477
|
def initialize
|
474
478
|
@proc = nil
|
475
|
-
@cmd =
|
479
|
+
@cmd = ''
|
476
480
|
end
|
477
481
|
|
478
482
|
def run(cmd_, arg_)
|
@@ -487,10 +491,12 @@ end
|
|
487
491
|
end
|
488
492
|
|
489
493
|
def pid; @proc.pid; end
|
494
|
+
|
490
495
|
def is_running?; @proc.is_running?; end
|
496
|
+
|
491
497
|
def exit_status; @proc.exitstatus; end
|
492
498
|
|
493
|
-
def wait(timeout, check_exit=true)
|
499
|
+
def wait(timeout, check_exit = true)
|
494
500
|
t = Time.now
|
495
501
|
begin
|
496
502
|
if @proc.check_status
|
@@ -523,7 +529,7 @@ end
|
|
523
529
|
|
524
530
|
def TestUtil.wait_for_file(filename, timeout)
|
525
531
|
t = Time.now
|
526
|
-
while !File.readable?(filename)
|
532
|
+
while !File.readable?(filename)
|
527
533
|
sleep(0.1)
|
528
534
|
if (Time.now() - t) >= timeout.to_f
|
529
535
|
STDERR.puts "ERROR: could not find file '#{filename}'"
|
data/test/test_runner.rb
CHANGED
@@ -49,23 +49,23 @@ else
|
|
49
49
|
ENV['RUBYLIB'] = incdirs.join(File::PATH_SEPARATOR)
|
50
50
|
if is_win32
|
51
51
|
ENV['PATH'] = [
|
52
|
-
File.directory?(ace_root) ? File.join(
|
52
|
+
File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
|
53
53
|
File.expand_path(File.join(root_path, 'ext')),
|
54
54
|
ENV['PATH']
|
55
55
|
].compact.join(File::PATH_SEPARATOR)
|
56
56
|
elsif RUBY_PLATFORM =~ /darwin/
|
57
57
|
ENV['DYLD_LIBRARY_PATH'] = [
|
58
|
-
File.directory?(ace_root) ? File.join(
|
58
|
+
File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
|
59
59
|
ENV['DYLD_LIBRARY_PATH']
|
60
60
|
].compact.join(File::PATH_SEPARATOR)
|
61
61
|
ENV['DYLD_FALLBACK_LIBRARY_PATH'] = [
|
62
|
-
File.directory?(ace_root) ? File.join(
|
62
|
+
File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
|
63
63
|
File.expand_path(File.join(root_path, 'ext')),
|
64
64
|
ENV['DYLD_FALLBACK_LIBRARY_PATH']
|
65
65
|
].compact.join(File::PATH_SEPARATOR)
|
66
66
|
else
|
67
67
|
ENV['LD_LIBRARY_PATH'] = [
|
68
|
-
File.directory?(ace_root) ? File.join(
|
68
|
+
File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
|
69
69
|
ENV['LD_LIBRARY_PATH']
|
70
70
|
].compact.join(File::PATH_SEPARATOR)
|
71
71
|
end
|
@@ -126,7 +126,7 @@ module TestFinder
|
|
126
126
|
puts dir
|
127
127
|
end
|
128
128
|
else
|
129
|
-
Dir.glob(File.join(path,
|
129
|
+
Dir.glob(File.join(path, '*')) {|psub| self.process_directory(psub)}
|
130
130
|
end
|
131
131
|
end
|
132
132
|
end
|
@@ -136,25 +136,25 @@ module TestFinder
|
|
136
136
|
script_name = File.basename($0)
|
137
137
|
opts.banner = "Usage: #{script_name} #{/r2corba/ =~ script_name ? 'test ' : nil}[options]"
|
138
138
|
|
139
|
-
opts.separator
|
139
|
+
opts.separator ''
|
140
140
|
|
141
|
-
opts.on(
|
142
|
-
|
143
|
-
|
144
|
-
opts.on(
|
145
|
-
|
146
|
-
|
141
|
+
opts.on('-x MATCH', '--exclude=MATCH',
|
142
|
+
'Do not run tests matching MATCH.',
|
143
|
+
'Default: nil') { |v| (OPTIONS[:exclude] ||= []) << v.to_s }
|
144
|
+
opts.on('-r MATCH', '--run=MATCH',
|
145
|
+
'Only run tests matching MATCH.',
|
146
|
+
'Default: nil (run all)') { |v| (OPTIONS[:runonly] ||= []) << v.to_s }
|
147
147
|
opts.on('-l', '--list',
|
148
148
|
'List tests, do not run.',
|
149
|
-
|
150
|
-
opts.on(
|
151
|
-
|
149
|
+
'Default: off') { OPTIONS[:listonly] = true }
|
150
|
+
opts.on('-d',
|
151
|
+
'Run with debugging output.',
|
152
152
|
"Default: ENV['R2CORBA_DEBUG'].nil? ? false : true") { OPTIONS[:debug] = true }
|
153
153
|
|
154
|
-
opts.separator
|
154
|
+
opts.separator ''
|
155
155
|
|
156
|
-
opts.on(
|
157
|
-
|
156
|
+
opts.on('-h', '--help',
|
157
|
+
'Show this help message.') { puts opts; exit }
|
158
158
|
|
159
159
|
opts.parse!(argv)
|
160
160
|
|
@@ -170,7 +170,7 @@ module TestFinder
|
|
170
170
|
end
|
171
171
|
|
172
172
|
if OPTIONS[:runonly].nil?
|
173
|
-
Dir.glob(File.join(TestFinder::ROOT,
|
173
|
+
Dir.glob(File.join(TestFinder::ROOT, '*')) do |p|
|
174
174
|
TestFinder.process_directory(p)
|
175
175
|
end
|
176
176
|
else
|