r2corba 1.5.5 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/ext/libr2tao/any.cpp +11 -10
  3. data/ext/libr2tao/exception.cpp +6 -8
  4. data/ext/libr2tao/exception.h +1 -1
  5. data/ext/libr2tao/longdouble.cpp +5 -9
  6. data/ext/libr2tao/object.cpp +33 -49
  7. data/ext/libr2tao/orb.cpp +38 -65
  8. data/ext/libr2tao/r2tao_ext.h +8 -7
  9. data/ext/libr2tao/required.cpp +1 -6
  10. data/ext/libr2tao/required.h +9 -23
  11. data/ext/libr2tao/values.cpp +92 -93
  12. data/ext/libr2tao/values.h +28 -30
  13. data/ext/librpoa/iortable.cpp +3 -4
  14. data/ext/librpoa/poa.cpp +22 -25
  15. data/ext/librpoa/servant.cpp +24 -23
  16. data/ext/librpoa/servant.h +10 -10
  17. data/lib/corba.rb +1 -1
  18. data/lib/corba/cbase/ORB.rb +19 -16
  19. data/lib/corba/cbase/Request.rb +3 -3
  20. data/lib/corba/cbase/Values.rb +4 -2
  21. data/lib/corba/cbase/exception.rb +4 -2
  22. data/lib/corba/cbase/poa.rb +1 -1
  23. data/lib/corba/cbase/policies.rb +1 -1
  24. data/lib/corba/cbase/require.rb +8 -1
  25. data/lib/corba/common/Any.rb +2 -1
  26. data/lib/corba/common/IDL.rb +1 -1
  27. data/lib/corba/common/ORB.rb +21 -21
  28. data/lib/corba/common/Object.rb +14 -13
  29. data/lib/corba/common/Servant.rb +4 -4
  30. data/lib/corba/common/Stub.rb +6 -6
  31. data/lib/corba/common/Typecode.rb +35 -8
  32. data/lib/corba/common/Union.rb +5 -0
  33. data/lib/corba/common/Values.rb +1 -0
  34. data/lib/corba/common/const.rb +1 -1
  35. data/lib/corba/common/exception.rb +2 -1
  36. data/lib/corba/common/version.rb +2 -2
  37. data/lib/corba/idl/IDL.rb +1 -1
  38. data/lib/corba/jbase/Any.rb +6 -4
  39. data/lib/corba/jbase/ORB.rb +2 -2
  40. data/lib/corba/jbase/Object.rb +13 -13
  41. data/lib/corba/jbase/Request.rb +3 -3
  42. data/lib/corba/jbase/Streams.rb +64 -0
  43. data/lib/corba/jbase/Typecode.rb +3 -2
  44. data/lib/corba/jbase/Values.rb +2 -0
  45. data/lib/corba/jbase/exception.rb +1 -0
  46. data/lib/corba/jbase/poa.rb +18 -18
  47. data/lib/corba/jbase/policies.rb +29 -29
  48. data/lib/corba/jbase/require.rb +4 -0
  49. data/lib/corba/svcs/ins/cos_naming.rb +10 -1
  50. data/lib/corba/svcs/ins/ins.rb +45 -45
  51. data/lib/corba/svcs/ins/naming_service.rb +6 -6
  52. data/lib/ridlbe/ruby/config.rb +27 -20
  53. data/lib/ridlbe/ruby/walker.rb +276 -253
  54. data/mkrf_conf_srcgem.rb +2 -2
  55. data/rakelib/build.rake +1 -1
  56. data/rakelib/config.rake +1 -1
  57. data/rakelib/config.rb +9 -9
  58. data/rakelib/ext.rake +6 -65
  59. data/rakelib/ext_r2tao.rb +2 -39
  60. data/rakelib/gem.rake +20 -20
  61. data/rakelib/gem.rb +1 -1
  62. data/rakelib/package.rake +1 -1
  63. data/test/BiDirectional/client.rb +16 -16
  64. data/test/BiDirectional/run_test.rb +10 -10
  65. data/test/BiDirectional/server.rb +20 -20
  66. data/test/CORBA_Services/Naming/BindingIterator/client.rb +14 -14
  67. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +12 -12
  68. data/test/CORBA_Services/Naming/BindingIterator/server.rb +17 -17
  69. data/test/CORBA_Services/Naming/Corbaname/client.rb +14 -14
  70. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +12 -12
  71. data/test/CORBA_Services/Naming/Corbaname/server.rb +20 -20
  72. data/test/CORBA_Services/Naming/Simple/client.rb +14 -14
  73. data/test/CORBA_Services/Naming/Simple/run_test.rb +12 -12
  74. data/test/CORBA_Services/Naming/Simple/server.rb +17 -17
  75. data/test/Collocation/run_test.rb +10 -10
  76. data/test/Collocation/test.rb +26 -19
  77. data/test/Connect_Timeout/client.rb +15 -15
  78. data/test/Connect_Timeout/run_test.rb +10 -10
  79. data/test/DII/client.rb +27 -27
  80. data/test/DII/run_test.rb +10 -10
  81. data/test/DII/server.rb +15 -15
  82. data/test/DSI/client.rb +15 -15
  83. data/test/DSI/run_test.rb +10 -10
  84. data/test/DSI/server.rb +16 -16
  85. data/test/Exceptions/client.rb +19 -19
  86. data/test/Exceptions/run_test.rb +10 -10
  87. data/test/Exceptions/server.rb +15 -15
  88. data/test/Hello/client.rb +15 -15
  89. data/test/Hello/run_test.rb +10 -10
  90. data/test/Hello/server.rb +16 -16
  91. data/test/IDL_Test/client.rb +20 -20
  92. data/test/IDL_Test/run_test.rb +10 -10
  93. data/test/IDL_Test/server.rb +18 -18
  94. data/test/IORMap/client.rb +14 -14
  95. data/test/IORMap/run_test.rb +10 -10
  96. data/test/IORMap/server.rb +22 -22
  97. data/test/IORTable/client.rb +14 -14
  98. data/test/IORTable/run_test.rb +10 -10
  99. data/test/IORTable/server.rb +22 -22
  100. data/test/Implicit_Conversion/client.rb +19 -16
  101. data/test/Implicit_Conversion/run_test.rb +10 -10
  102. data/test/Implicit_Conversion/server.rb +15 -15
  103. data/test/Multi_Threading/Multiple_ORB/client.rb +13 -13
  104. data/test/Multi_Threading/Multiple_ORB/run_test.rb +10 -10
  105. data/test/Multi_Threading/Multiple_ORB/server.rb +16 -16
  106. data/test/Multi_Threading/Simple/client.rb +15 -15
  107. data/test/Multi_Threading/Simple/run_test.rb +10 -10
  108. data/test/Multi_Threading/Simple/server.rb +15 -15
  109. data/test/Multi_Threading/Threads/client.rb +15 -15
  110. data/test/Multi_Threading/Threads/run_test.rb +10 -10
  111. data/test/Multi_Threading/Threads/server.rb +17 -17
  112. data/test/Multi_Threading/Threads/watchdog.rb +15 -15
  113. data/test/Multiple_Servant_Interfaces/client.rb +13 -13
  114. data/test/Multiple_Servant_Interfaces/run_test.rb +10 -10
  115. data/test/Multiple_Servant_Interfaces/server.rb +17 -17
  116. data/test/Nil/run_test.rb +10 -10
  117. data/test/Nil/test.rb +13 -13
  118. data/test/OBV/AbstractInterface/client.rb +13 -13
  119. data/test/OBV/AbstractInterface/run_test.rb +10 -10
  120. data/test/OBV/AbstractInterface/server.rb +19 -18
  121. data/test/OBV/Custom/OBV_impl.rb +2 -0
  122. data/test/OBV/Custom/client.rb +13 -13
  123. data/test/OBV/Custom/run_test.rb +10 -10
  124. data/test/OBV/Custom/server.rb +15 -15
  125. data/test/OBV/Simple/OBV_impl.rb +1 -0
  126. data/test/OBV/Simple/client.rb +13 -13
  127. data/test/OBV/Simple/run_test.rb +10 -10
  128. data/test/OBV/Simple/server.rb +15 -15
  129. data/test/OBV/Simple_Event/Event_impl.rb +1 -0
  130. data/test/OBV/Simple_Event/client.rb +13 -13
  131. data/test/OBV/Simple_Event/run_test.rb +10 -10
  132. data/test/OBV/Simple_Event/server.rb +15 -15
  133. data/test/OBV/Supports/client.rb +18 -18
  134. data/test/OBV/Supports/run_test.rb +10 -10
  135. data/test/OBV/Supports/server.rb +14 -14
  136. data/test/OBV/Supports/supports_impl.rb +3 -0
  137. data/test/OBV/Tree/client.rb +13 -13
  138. data/test/OBV/Tree/run_test.rb +10 -10
  139. data/test/OBV/Tree/server.rb +18 -18
  140. data/test/OBV/Truncatable/client.rb +56 -56
  141. data/test/OBV/Truncatable/run_test.rb +10 -10
  142. data/test/OBV/Truncatable/server.rb +14 -14
  143. data/test/OBV/ValueBox/client.rb +148 -147
  144. data/test/OBV/ValueBox/run_test.rb +10 -10
  145. data/test/OBV/ValueBox/server.rb +15 -15
  146. data/test/Object/client.rb +13 -13
  147. data/test/Object/run_test.rb +10 -10
  148. data/test/Object/server.rb +18 -18
  149. data/test/POA/run_test.rb +10 -10
  150. data/test/POA/test.rb +15 -15
  151. data/test/Param_Test/client.rb +47 -47
  152. data/test/Param_Test/run_test.rb +10 -10
  153. data/test/Param_Test/server.rb +55 -55
  154. data/test/Performance/Simple/client.rb +15 -15
  155. data/test/Performance/Simple/run_test.rb +10 -10
  156. data/test/Performance/Simple/server.rb +15 -15
  157. data/test/Policies/run_test.rb +10 -10
  158. data/test/Policies/test.rb +23 -23
  159. data/test/Timeout/client.rb +17 -17
  160. data/test/Timeout/run_test.rb +10 -10
  161. data/test/Timeout/server.rb +18 -18
  162. data/test/lib/test.rb +13 -7
  163. data/test/test_runner.rb +19 -19
  164. metadata +4 -5
  165. data/ext/extload/extload.c +0 -59
@@ -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("--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 }
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("-h", "--help",
37
- "Show this help message.") { puts opts; exit }
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
- "Hello there!"
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
- "org.omg.PortableInterceptor.ORBInitializerClass.bidir_init" =>
68
- "org.jacorb.orb.giop.BiDirConnectionInitializer"
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(["-ORBDebugLevel", OPTIONS[:orb_debuglevel]], 'myORB', props)
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
@@ -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("--k IORFILE",
29
- "Set IOR.",
28
+ opts.on('--k IORFILE',
29
+ 'Set IOR.',
30
30
  "Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
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 }
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("-h", "--help",
41
- "Show this help message.") { puts opts; exit }
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 = [ "none", "orb", "thread", "object" ]
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 "==> Trapped a TIMEOUT exception (expected)"
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(["-ORBDebugLevel", OPTIONS[:orb_debuglevel]], 'myORB')
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
 
@@ -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("-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] = '' }
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("-h", "--help",
35
- "Show this help message.") { puts opts; exit }
34
+ opts.on('-h', '--help',
35
+ 'Show this help message.') { puts opts; exit }
36
36
 
37
37
  opts.parse!
38
38
  end
@@ -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("--o IORFILE",
28
- "Set IOR filename.",
27
+ opts.on('--o IORFILE',
28
+ 'Set IOR filename.',
29
29
  "Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
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 }
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("-h", "--help",
43
- "Show this help message.") { puts opts; exit }
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(["-ORBDebugLevel", OPTIONS[:orb_debuglevel]], 'myORB')
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 "SIGINT - shutting down ORB..."
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("ProcessInfo",
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, "CreateProcess() failed: ", get_last_error
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, "GetExitCodeProcess failed: ", get_last_error
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) do
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(ENV['ACE_ROOT'], 'lib') : nil,
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(ENV['ACE_ROOT'], 'lib') : nil,
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(ENV['ACE_ROOT'], 'lib') : nil,
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(ENV['ACE_ROOT'], 'lib') : nil,
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, "*")) {|psub| self.process_directory(psub)}
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("-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 }
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
- "Default: off") { OPTIONS[:listonly] = true }
150
- opts.on("-d",
151
- "Run with debugging output.",
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("-h", "--help",
157
- "Show this help message.") { puts opts; exit }
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, "*")) do |p|
173
+ Dir.glob(File.join(TestFinder::ROOT, '*')) do |p|
174
174
  TestFinder.process_directory(p)
175
175
  end
176
176
  else