testability-driver 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. data/bin/start_app_perf +6 -6
  2. data/lib/tdriver-devtools/behaviour/xml/rdoc_behaviour_xml_generator.rb +4 -4
  3. data/lib/tdriver-devtools/doc/xslt/template.xsl +103 -21
  4. data/lib/tdriver/base/behaviour/behaviours/object_behaviour_description.rb +1 -1
  5. data/lib/tdriver/base/command_data/loader.rb +6 -2
  6. data/lib/tdriver/base/loader.rb +21 -14
  7. data/lib/tdriver/base/state_object.rb +1 -1
  8. data/lib/tdriver/base/sut/controller.rb +8 -2
  9. data/lib/tdriver/base/sut/generic/behaviours/sut.rb +103 -46
  10. data/lib/tdriver/base/sut/generic/behaviours/switchbox_behaviour.rb +2 -2
  11. data/lib/tdriver/base/sut/generic/behaviours/verification.rb +1 -1
  12. data/lib/tdriver/base/sut/generic/commands/application.rb +18 -278
  13. data/lib/tdriver/base/sut/generic/commands/key_sequence.rb +1 -1
  14. data/lib/tdriver/base/sut/sut.rb +1 -1
  15. data/lib/tdriver/base/test_object/abstract.rb +1 -1
  16. data/lib/tdriver/base/test_object/adapter.rb +4 -1
  17. data/lib/tdriver/base/test_object/behaviours/syncronization.rb +3 -3
  18. data/lib/tdriver/base/test_object/behaviours/test_object.rb +61 -24
  19. data/lib/tdriver/base/test_object/cache.rb +6 -4
  20. data/lib/tdriver/base/test_object/factory.rb +4 -2
  21. data/lib/tdriver/base/test_object/loader.rb +23 -14
  22. data/lib/tdriver/base/test_object/xml/abstraction.rb +63 -0
  23. data/lib/tdriver/base/test_object/xml/adapter.rb +4 -1
  24. data/lib/tdriver/report/report_test_run.rb +1 -1
  25. data/lib/tdriver/report/report_writer.rb +4 -3
  26. data/lib/tdriver/util/common/boolean.rb +10 -13
  27. data/lib/tdriver/util/common/environment.rb +8 -7
  28. data/lib/tdriver/util/common/hash.rb +5 -5
  29. data/lib/tdriver/util/common/numeric.rb +5 -5
  30. data/lib/tdriver/util/common/object.rb +3 -3
  31. data/lib/tdriver/util/common/retryable.rb +65 -2
  32. data/lib/tdriver/util/common/string.rb +4 -4
  33. data/lib/tdriver/util/database/access.rb +9 -11
  34. data/lib/tdriver/util/fixture/service.rb +54 -0
  35. data/lib/tdriver/util/localisation/localisation.rb +3 -2
  36. data/lib/tdriver/util/logger/logger.rb +55 -41
  37. data/lib/tdriver/util/parameter/parameter.rb +38 -7
  38. data/lib/tdriver/util/xml/abstraction.rb +8 -8
  39. data/lib/tdriver/util/xml/builder.rb +1 -1
  40. data/lib/tdriver/util/xml/xml.rb +11 -11
  41. data/lib/tdriver/verify/verify.rb +33 -36
  42. data/lib/tdriver/version.rb +1 -1
  43. data/xml/defaults/sut_generic.xml +1 -29
  44. data/xml/templates/generic.xml +28 -0
  45. metadata +48 -17
@@ -25,7 +25,7 @@ module TDriver
25
25
 
26
26
  def new
27
27
 
28
- warn_caller "$1:$2 warning: #{ self.to_s } is static class; unable initialize new instance of it"
28
+ warn_caller "$1:$2 warning: #{ to_s } is static class; unable initialize new instance of it"
29
29
 
30
30
  nil
31
31
 
@@ -130,7 +130,7 @@ module TDriver
130
130
 
131
131
  if default.empty?
132
132
 
133
- raise MobyUtil::ParameterNotFoundError, "Parameter #{ key } not found" unless block_given?
133
+ raise MobyUtil::ParameterNotFoundError, "Parameter #{ key.inspect } not found" unless block_given?
134
134
 
135
135
  # yield with key if block given
136
136
  yield key
@@ -161,6 +161,19 @@ module TDriver
161
161
 
162
162
  end
163
163
 
164
+ # TODO: document me
165
+ def apply_template( name )
166
+
167
+ recursive_merge!(
168
+ TDriver::Parameter.templates.fetch( name.to_s ){
169
+
170
+ raise MobyUtil::TemplateNotFoundError, "Template #{ name.inspect } not found"
171
+
172
+ }
173
+ )
174
+
175
+ end
176
+
164
177
  # for backwards compatibility
165
178
  def kind_of?( klass )
166
179
 
@@ -200,7 +213,7 @@ module TDriver
200
213
 
201
214
  def new
202
215
 
203
- warn_caller "$1:$2 warning: #{ self.to_s } is static class; unable initialize new instance of it"
216
+ warn_caller "$1:$2 warning: #{ to_s } is static class; unable initialize new instance of it"
204
217
 
205
218
  nil
206
219
 
@@ -899,6 +912,24 @@ module TDriver
899
912
 
900
913
  end
901
914
 
915
+ # TODO: document me
916
+ def has_template?( name )
917
+
918
+ @templates.has_key?( name.to_s )
919
+
920
+ end
921
+
922
+ # TODO: document me
923
+ def apply_template( name )
924
+
925
+ @parameters.recursive_merge!(
926
+ @templates.fetch( name.to_s ){
927
+ raise MobyUtil::TemplateNotFoundError, "Template #{ name.inspect } not found"
928
+ }
929
+ )
930
+
931
+ end
932
+
902
933
  # TODO: document me
903
934
  def has_key?( key )
904
935
 
@@ -912,7 +943,7 @@ module TDriver
912
943
  @parameters.has_value?( key )
913
944
 
914
945
  end
915
-
946
+
916
947
  # TODO: document me
917
948
  def keys
918
949
 
@@ -1041,7 +1072,7 @@ module MobyUtil
1041
1072
 
1042
1073
  def new
1043
1074
 
1044
- warn_caller "$1:$2 warning: #{ self.to_s } is deprecated; use TDriver::ParameterHash instead"
1075
+ warn_caller "$1:$2 warning: #{ to_s } is deprecated; use TDriver::ParameterHash instead"
1045
1076
 
1046
1077
  TDriver::ParameterHash.new
1047
1078
 
@@ -1059,7 +1090,7 @@ module MobyUtil
1059
1090
 
1060
1091
  def new
1061
1092
 
1062
- warn_caller "$1:$2 warning: #{ self.to_s } is static class; unable initialize new instance of it"
1093
+ warn_caller "$1:$2 warning: #{ to_s } is static class; unable initialize new instance of it"
1063
1094
 
1064
1095
  nil
1065
1096
 
@@ -1094,7 +1125,7 @@ module MobyUtil
1094
1125
 
1095
1126
  def new
1096
1127
 
1097
- warn_caller "$1:$2 warning: #{ self.to_s } is static class; unable initialize new instance of it"
1128
+ warn_caller "$1:$2 warning: #{ to_s } is static class; unable initialize new instance of it"
1098
1129
 
1099
1130
  nil
1100
1131
 
@@ -47,49 +47,49 @@ module MobyUtil
47
47
  # TODO: document me
48
48
  def comment?
49
49
 
50
- self.kind_of?( MobyUtil::XML::Comment )
50
+ kind_of?( MobyUtil::XML::Comment )
51
51
 
52
52
  end
53
53
 
54
54
  # TODO: document me
55
55
  def text?
56
56
 
57
- self.kind_of?( MobyUtil::XML::Text )
57
+ kind_of?( MobyUtil::XML::Text )
58
58
 
59
59
  end
60
60
 
61
61
  # TODO: document me
62
62
  def attribute?
63
63
 
64
- self.kind_of?( MobyUtil::XML::Attribute )
64
+ kind_of?( MobyUtil::XML::Attribute )
65
65
 
66
66
  end
67
67
 
68
68
  # TODO: document me
69
69
  def nodeset?
70
70
 
71
- self.kind_of?( MobyUtil::XML::Nodeset )
71
+ kind_of?( MobyUtil::XML::Nodeset )
72
72
 
73
73
  end
74
74
 
75
75
  # TODO: document me
76
76
  def element?
77
77
 
78
- self.kind_of?( MobyUtil::XML::Element )
78
+ kind_of?( MobyUtil::XML::Element )
79
79
 
80
80
  end
81
81
 
82
82
  # TODO: document me
83
83
  def document?
84
84
 
85
- self.kind_of?( MobyUtil::XML::Document )
85
+ kind_of?( MobyUtil::XML::Document )
86
86
 
87
87
  end
88
88
 
89
89
  # TODO: document me
90
90
  def nil?
91
91
 
92
- self.kind_of?( MobyUtil::XML::NilNode )
92
+ kind_of?( MobyUtil::XML::NilNode )
93
93
 
94
94
  end
95
95
 
@@ -103,7 +103,7 @@ module MobyUtil
103
103
  # print only object type and id hex
104
104
  def inspect
105
105
 
106
- "#<#{ self.class }:0x#{ ( "%x" % ( self.object_id.to_i << 1 ) )[ 3 .. -1 ] }>"
106
+ "#<#{ self.class }:0x#{ ( "%x" % ( object_id.to_i << 1 ) )[ 3 .. -1 ] }>"
107
107
 
108
108
  end
109
109
 
@@ -34,7 +34,7 @@ module MobyUtil
34
34
  $stderr.puts "#{ file }:#{ line } warning: deprecated method #{ self.class }#new, use MobyUtil::XML#build instead"
35
35
 
36
36
  # extend builder behaviour of current parser
37
- self.extend( ( MobyUtil::XML.current_parser )::Builder )
37
+ extend( ( ::MobyUtil::XML.current_parser )::Builder )
38
38
 
39
39
  # create builder object
40
40
  build( &block )
@@ -26,6 +26,8 @@ module MobyUtil
26
26
  private
27
27
 
28
28
  def initialize_class
29
+
30
+ @parser = nil
29
31
 
30
32
  # empty xml cache hash
31
33
  @document_cache = { :cache => [], :objects => {} }
@@ -33,8 +35,8 @@ module MobyUtil
33
35
  # default xml cache buffer size
34
36
  @document_cache_buffer_size = 10
35
37
 
36
- # set used parser module
37
- self.current_parser = MobyUtil::XML::Nokogiri
38
+ # configure parser module to be used
39
+ __send__(:current_parser=, MobyUtil::XML::Nokogiri)
38
40
 
39
41
  end
40
42
 
@@ -47,7 +49,7 @@ module MobyUtil
47
49
  # == raises
48
50
  def self.current_parser
49
51
 
50
- @@parser
52
+ @parser
51
53
 
52
54
  end
53
55
 
@@ -83,12 +85,10 @@ module MobyUtil
83
85
  # nil
84
86
  # Document:: XML document object
85
87
  # == raises
86
- def self.current_parser=( value )
87
-
88
- #raise RuntimeError, "Parser can be set only once per session" unless defined?( @@parser )
88
+ def self.current_parser=( parser )
89
89
 
90
90
  # set current parser
91
- @@parser = value
91
+ @parser = parser
92
92
 
93
93
  # apply parser implementation to abstraction modules
94
94
  [
@@ -107,13 +107,13 @@ module MobyUtil
107
107
  begin
108
108
 
109
109
  # include parser behaviour
110
- include @@parser.const_get( _module )
110
+ include parser.const_get( _module )
111
111
 
112
112
  rescue NameError
113
113
 
114
114
  # raise proper exception if behaviour module not found
115
- raise NotImplementedError, "Required behaviour module #{ @@parser.name }::#{ _module } not found"
116
-
115
+ raise NotImplementedError, "Required behaviour module #{ parser.name }::#{ _module } not found"
116
+
117
117
  end
118
118
 
119
119
  }
@@ -121,7 +121,7 @@ module MobyUtil
121
121
  end
122
122
 
123
123
  # return current parser as result
124
- value
124
+ parser
125
125
 
126
126
  end
127
127
 
@@ -162,7 +162,7 @@ module TDriverVerify
162
162
 
163
163
  end
164
164
 
165
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify;"
165
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify;"
166
166
 
167
167
  # raise the exception
168
168
  raise MobyBase::VerificationError, error_message
@@ -177,7 +177,7 @@ module TDriverVerify
177
177
 
178
178
  end
179
179
 
180
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify;"
180
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify;"
181
181
 
182
182
  nil
183
183
 
@@ -294,7 +294,7 @@ module TDriverVerify
294
294
 
295
295
  end
296
296
 
297
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_not;"
297
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_not;"
298
298
 
299
299
  # raise the exception
300
300
  raise MobyBase::VerificationError, error_message
@@ -309,7 +309,7 @@ module TDriverVerify
309
309
 
310
310
  end
311
311
 
312
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_not;"
312
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_not;"
313
313
 
314
314
  nil
315
315
 
@@ -433,7 +433,7 @@ module TDriverVerify
433
433
 
434
434
  end
435
435
 
436
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_true;"
436
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_true;"
437
437
 
438
438
  # raise the exception
439
439
  raise MobyBase::VerificationError, error_message
@@ -448,7 +448,7 @@ module TDriverVerify
448
448
 
449
449
  end
450
450
 
451
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_true;"
451
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_true;"
452
452
 
453
453
  nil
454
454
 
@@ -572,7 +572,7 @@ module TDriverVerify
572
572
 
573
573
  end
574
574
 
575
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_false;"
575
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_false;"
576
576
 
577
577
  # raise the exception
578
578
  raise MobyBase::VerificationError, error_message
@@ -587,7 +587,7 @@ module TDriverVerify
587
587
 
588
588
  end
589
589
 
590
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_false;"
590
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_false;"
591
591
 
592
592
  nil
593
593
 
@@ -709,7 +709,7 @@ module TDriverVerify
709
709
 
710
710
  end
711
711
 
712
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_equal;"
712
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_equal;"
713
713
 
714
714
  # raise the exception
715
715
  raise MobyBase::VerificationError, error_message
@@ -724,7 +724,7 @@ module TDriverVerify
724
724
 
725
725
  end
726
726
 
727
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_equal;"
727
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_equal;"
728
728
 
729
729
  nil
730
730
 
@@ -846,7 +846,7 @@ module TDriverVerify
846
846
 
847
847
  end
848
848
 
849
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_less;"
849
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_less;"
850
850
 
851
851
  # raise the exception
852
852
  raise MobyBase::VerificationError, error_message
@@ -861,7 +861,7 @@ module TDriverVerify
861
861
 
862
862
  end
863
863
 
864
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_less;"
864
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_less;"
865
865
 
866
866
  nil
867
867
 
@@ -983,7 +983,7 @@ module TDriverVerify
983
983
 
984
984
  end
985
985
 
986
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_greater;"
986
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_greater;"
987
987
 
988
988
  # raise the exception
989
989
  raise MobyBase::VerificationError, error_message
@@ -998,7 +998,7 @@ module TDriverVerify
998
998
 
999
999
  end
1000
1000
 
1001
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_greater;"
1001
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_greater;"
1002
1002
 
1003
1003
  nil
1004
1004
 
@@ -1124,7 +1124,7 @@ module TDriverVerify
1124
1124
 
1125
1125
  end
1126
1126
 
1127
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_regexp;"
1127
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s }.\n #{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_regexp;"
1128
1128
 
1129
1129
  # raise the exception
1130
1130
  raise MobyBase::VerificationError, error_message
@@ -1139,7 +1139,7 @@ module TDriverVerify
1139
1139
 
1140
1140
  end
1141
1141
 
1142
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_regexp;"
1142
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_regexp;"
1143
1143
 
1144
1144
  nil
1145
1145
 
@@ -1188,7 +1188,7 @@ module TDriverVerify
1188
1188
  # wait for the signal
1189
1189
  begin
1190
1190
 
1191
- self.wait_for_signal( timeout, signal_name, &block )
1191
+ wait_for_signal( timeout, signal_name, &block )
1192
1192
 
1193
1193
  rescue
1194
1194
 
@@ -1205,7 +1205,7 @@ module TDriverVerify
1205
1205
 
1206
1206
  $logger.enabled = logging_enabled
1207
1207
 
1208
- $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s } using timeout '#{ timeout }.;#{ self.kind_of?(MobyBase::SUT) ? self.id.to_s + ';sut' : ';' };{};verify_signal;#{ signal_name }"
1208
+ $logger.behaviour "FAIL;Verification #{ message }failed: #{ $!.to_s } using timeout '#{ timeout }.;#{ kind_of?(MobyBase::SUT) ? id.to_s + ';sut' : ';' };{};verify_signal;#{ signal_name }"
1209
1209
 
1210
1210
  raise
1211
1211
 
@@ -1215,7 +1215,7 @@ module TDriverVerify
1215
1215
 
1216
1216
  end
1217
1217
 
1218
- $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ self.kind_of?( MobyBase::SUT ) ? self.id.to_s + ';sut' : ';' };{};verify_signal;#{ signal_name }"
1218
+ $logger.behaviour "PASS;Verification #{ message }at #{ verify_caller } was successful#{ timeout.nil? ? '' : ' using timeout ' + timeout.to_s }.;#{ kind_of?( MobyBase::SUT ) ? id.to_s + ';sut' : ';' };{};verify_signal;#{ signal_name }"
1219
1219
 
1220
1220
  nil
1221
1221
 
@@ -1223,11 +1223,12 @@ module TDriverVerify
1223
1223
 
1224
1224
  private
1225
1225
 
1226
+ # TODO: remove me?
1226
1227
  def get_end_time( timeout )
1227
1228
 
1228
- if self.kind_of?( MobyBase::SUT )
1229
+ if kind_of?( MobyBase::SUT )
1229
1230
 
1230
- Time.now + ( timeout.nil? ? $parameters[ self.sut ][ :synchronization_timeout, '10' ].to_i : timeout.to_i )
1231
+ Time.now + ( timeout.nil? ? $parameters[ sut ][ :synchronization_timeout, '10' ].to_i : timeout.to_i )
1231
1232
 
1232
1233
  else
1233
1234
 
@@ -1238,20 +1239,16 @@ module TDriverVerify
1238
1239
  end
1239
1240
 
1240
1241
  def get_timeout( timeout )
1241
-
1242
- #if timeout.nil?
1243
-
1244
- if self.kind_of?( MobyBase::SUT )
1245
1242
 
1246
- timeout = $parameters[ self.sut ][ :synchronization_timeout, '10' ].to_i if timeout.nil?
1243
+ if kind_of?( MobyBase::SUT )
1247
1244
 
1248
- else
1245
+ timeout = $parameters[ sut ][ :synchronization_timeout, '10' ] if timeout.nil?
1249
1246
 
1250
- timeout = $parameters[ :synchronization_timeout, '10' ].to_i if timeout.nil?
1247
+ else
1251
1248
 
1252
- end
1249
+ timeout = $parameters[ :synchronization_timeout, '10' ] if timeout.nil?
1253
1250
 
1254
- #end
1251
+ end
1255
1252
 
1256
1253
  timeout.to_i
1257
1254
 
@@ -1260,8 +1257,8 @@ module TDriverVerify
1260
1257
  # Current count of combined sut refresh calls to all suts
1261
1258
  def ref_counter
1262
1259
  counter = 0
1263
- if self.kind_of? MobyBase::SUT
1264
- counter = self.dump_count
1260
+ if kind_of?( MobyBase::SUT )
1261
+ counter = dump_count
1265
1262
  else
1266
1263
  TDriver::SUTFactory.connected_suts.each do |sut_id, sut_attributes|
1267
1264
  counter += sut_attributes[:sut].dump_count
@@ -1271,16 +1268,16 @@ module TDriverVerify
1271
1268
  end
1272
1269
 
1273
1270
  def verify_refresh(b_use_id=true)
1274
- if self.kind_of? MobyBase::SUT
1271
+ if kind_of?( MobyBase::SUT )
1275
1272
  begin
1276
- appid = self.get_application_id
1273
+ appid = get_application_id
1277
1274
  rescue
1278
1275
  appid='-1'
1279
1276
  end
1280
1277
  if appid != "-1" && b_use_id
1281
- self.refresh({:id => appid})
1278
+ refresh({:id => appid})
1282
1279
  else
1283
- self.refresh
1280
+ refresh
1284
1281
  end
1285
1282
  else
1286
1283
  #refresh all connected suts