origen_testers 0.19.3 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6eea40e7cbf8f983adb36452ae060cca548731f2
4
- data.tar.gz: 9c27b74043fc622cdf3e59bab06c32cf9c25c649
2
+ SHA256:
3
+ metadata.gz: 2bb719c179345dee09336e7c9ef743de9383d0bc32602c58226a682607c93016
4
+ data.tar.gz: 7f98c2c6a7d9639bf70c42d4264ba3294b72b814b3c455e9983d4342c3ade773
5
5
  SHA512:
6
- metadata.gz: f79550936613abfe33c20b82c33c2ac3d41ae30cf489405c72b57a65f4ebd2a5fe3e1450c2ad28d8297d209638427438124eca0ec50937de94c95dcbf53e21d9
7
- data.tar.gz: 2d003fd7fa9196c2acdf7975500eec2e71488bfeea6c6814088c8dc674dd6a33324929e769fa5535cca8a7ab83eaf41fe3600fb5d625f763c9b8a0be649ed9f9
6
+ metadata.gz: 5530008ddd55eb90eb4d6502dc8a61633eb28a88d1eed1baa8e9b51ed52bbd3b274c8fb7bd680318716b6c70d910a40c27c2515134b1ce067e69d6e2fde2fce6
7
+ data.tar.gz: d599275895db3b446e5f8c3ebe9da2101aa759e8ba622ca5c9a94c14fb12159409f35a1b423df2f6383c70c19136a638c2383a3ce6ac62a2ddb2f48c4f37ca7f
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
- MINOR = 19
4
- BUGFIX = 3
3
+ MINOR = 20
4
+ BUGFIX = 0
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -164,6 +164,27 @@ module OrigenTesters
164
164
  end
165
165
  alias_method :signature, :sig
166
166
 
167
+ def active_description
168
+ flow_file = OrigenTesters::Flow.callstack.last
169
+ called_from = caller.find { |l| l =~ /^#{flow_file}:.*/ }
170
+ desc = nil
171
+ if called_from
172
+ called_from = called_from.split(':')
173
+ line_no = called_from[1].to_i
174
+ ht_coms = OrigenTesters::Flow.ht_comments
175
+ cc_coms = OrigenTesters::Flow.cc_comments
176
+ if line_no
177
+ if ht_coms[line_no]
178
+ desc = ht_coms[line_no].join(' ')
179
+ end
180
+ if cc_coms[line_no] && cc_coms[line_no].first
181
+ desc = [cc_coms[line_no].shift].join(' ')
182
+ end
183
+ end
184
+ end
185
+ desc
186
+ end
187
+
167
188
  private
168
189
 
169
190
  # Make a unique signature for the flow based on the flow name and the name of
@@ -8,7 +8,7 @@ module OrigenTesters
8
8
  # Returns an array containing all runtime variables which get set by the flow
9
9
  attr_reader :set_runtime_variables
10
10
 
11
- attr_accessor :add_flow_enable, :flow_name
11
+ attr_accessor :add_flow_enable, :flow_name, :flow_description
12
12
 
13
13
  def var_filename
14
14
  @var_filename || 'global'
@@ -26,6 +26,10 @@ module OrigenTesters
26
26
  @flow_name || filename.sub(/\..*/, '').upcase
27
27
  end
28
28
 
29
+ def flow_description
30
+ @flow_description || ''
31
+ end
32
+
29
33
  def hardware_bin_descriptions
30
34
  @hardware_bin_descriptions ||= {}
31
35
  end
@@ -57,18 +61,18 @@ module OrigenTesters
57
61
  else
58
62
  flow_control_variables << [var, 0]
59
63
  end
60
- h << " if @#{var} == 1 then"
61
- h << ' {'
62
- i = ' '
64
+ h << " if @#{var} == 1 then"
65
+ h << ' {'
66
+ i = ' '
63
67
  else
64
68
  i = ''
65
69
  end
66
70
  if set_runtime_variables.size > 0
67
- h << i + ' {'
71
+ h << i + ' {'
68
72
  set_runtime_variables.each do |var|
69
- h << i + " @#{generate_flag_name(var.to_s)} = -1;"
73
+ h << i + " @#{generate_flag_name(var.to_s)} = -1;"
70
74
  end
71
- h << i + ' }, open,"Init Flow Control Vars", ""'
75
+ h << i + ' }, open,"Init Flow Control Vars", ""'
72
76
  end
73
77
  h
74
78
  end
@@ -76,13 +80,13 @@ module OrigenTesters
76
80
  def flow_footer
77
81
  f = []
78
82
  if add_flow_enable
79
- f << ' }'
80
- f << ' else'
81
- f << ' {'
82
- f << ' }'
83
+ f << ' }'
84
+ f << ' else'
85
+ f << ' {'
86
+ f << ' }'
83
87
  end
84
88
  f << ''
85
- f << " }, open,\"#{flow_name}\",\"\""
89
+ f << " }, open,\"#{flow_name}\",\"#{flow_description}\""
86
90
  f
87
91
  end
88
92
 
@@ -109,7 +113,7 @@ module OrigenTesters
109
113
  end
110
114
 
111
115
  def line(str)
112
- @lines << (' ' * @indent) + str
116
+ @lines << ' ' + (' ' * (@indent - 1)) + str
113
117
  end
114
118
 
115
119
  # def on_flow(node)
@@ -327,17 +331,18 @@ module OrigenTesters
327
331
  desc = node.find(:bin).to_a[1]
328
332
  sbin = node.find(:softbin).try(:value)
329
333
  sdesc = node.find(:softbin).to_a[1] || 'fail'
334
+ overon = (node.find(:not_over_on).try(:value) == true) ? 'not_over_on' : 'over_on'
330
335
  if bin && desc
331
336
  hardware_bin_descriptions[bin] ||= desc
332
337
  end
333
338
 
334
339
  if node.to_a[0] == 'pass'
335
- line "stop_bin \"#{sbin}\", \"\", , good, noreprobe, green, #{bin}, over_on;"
340
+ line "stop_bin \"#{sbin}\", \"\", , good, noreprobe, green, #{bin}, #{overon};"
336
341
  else
337
342
  if tester.create_limits_file
338
343
  line 'multi_bin;'
339
344
  else
340
- line "stop_bin \"#{sbin}\", \"#{sdesc}\", , bad, noreprobe, red, #{bin}, over_on;"
345
+ line "stop_bin \"#{sbin}\", \"#{sdesc}\", , bad, noreprobe, red, #{bin}, #{overon};"
341
346
  end
342
347
  end
343
348
  end
@@ -27,6 +27,7 @@ module OrigenTesters
27
27
  self.unique_test_names = options[:unique_test_names]
28
28
  end
29
29
  flow.flow_name = options[:flow_name]
30
+ flow.flow_description = options[:flow_description] || OrigenTesters::Flow.flow_comments.join(' ')
30
31
  end
31
32
  end
32
33
 
@@ -123,10 +123,14 @@ testmethodparameters
123
123
  end
124
124
  -----------------------------------------------------------------
125
125
  testmethodlimits
126
-
126
+ % at_least_one = false
127
127
  % unless tester.create_limits_file
128
128
  % if program
129
129
  % program.testmethodlimits.each do |id, parameters|
130
+ % unless at_least_one
131
+
132
+ % at_least_one = true
133
+ % end
130
134
  <%= id %>:
131
135
  % parameters.each do |key, val|
132
136
  <%= key %> = <%= val %>
@@ -135,19 +139,29 @@ testmethodlimits
135
139
  % else
136
140
  % test_methods.sorted_collection.each do |method|
137
141
  % if method.respond_to?(:limits) && method.limits
142
+ % unless at_least_one
143
+
144
+ % at_least_one = true
145
+ % end
138
146
  <%= method.id %>:
139
147
  <%= method.limits %>;
140
148
  % end
141
149
  % end
142
150
  % end
143
151
  % end
152
+ % if at_least_one
144
153
 
154
+ % end
145
155
  end
146
156
  -----------------------------------------------------------------
147
- testmethods
148
-
157
+ % at_least_one = false
149
158
  % if program
150
159
  % program.testmethods.each do |id, parameters|
160
+ % unless at_least_one
161
+ testmethods
162
+
163
+ % at_least_one = true
164
+ % end
151
165
  <%= id %>:
152
166
  % parameters.each do |key, val|
153
167
  <%= key %> = <%= val %>
@@ -155,17 +169,28 @@ testmethods
155
169
  % end
156
170
  % else
157
171
  % test_methods.sorted_collection.each do |method|
172
+ % unless at_least_one
173
+ testmethods
174
+
175
+ % at_least_one = true
176
+ % end
158
177
  <%= method.id %>:
159
178
  testmethod_class = "<%= method.klass %>";
160
179
  % end
161
180
  % end
181
+ % if at_least_one
162
182
 
163
183
  end
164
184
  -----------------------------------------------------------------
165
- test_suites
166
-
185
+ % end
186
+ % at_least_one = false
167
187
  % if program
168
188
  % program.test_suites.each do |id, parameters|
189
+ % unless at_least_one
190
+ test_suites
191
+
192
+ % at_least_one = true
193
+ % end
169
194
  <%= id %>:
170
195
  % parameters.each do |key, val|
171
196
  <%= key %> = <%= val %>
@@ -173,15 +198,22 @@ test_suites
173
198
  % end
174
199
  % else
175
200
  % test_suites.sorted_collection.each do |suite|
201
+ % unless at_least_one
202
+ test_suites
203
+
204
+ % at_least_one = true
205
+ % end
176
206
  <%= suite.name %>:
177
207
  % suite.lines.each do |line|
178
208
  <%= line %>
179
209
  % end
180
210
  % end
181
211
  % end
212
+ % if at_least_one
182
213
 
183
214
  end
184
215
  -----------------------------------------------------------------
216
+ % end
185
217
  test_flow
186
218
 
187
219
  % if program
@@ -77,6 +77,36 @@ module OrigenTesters
77
77
  end
78
78
  end
79
79
 
80
+ def func_with_comment(name, options = {})
81
+ if tester.v93k?
82
+ options = {
83
+ duration: :static
84
+ }.merge(options)
85
+ number = options[:number]
86
+
87
+ block_loop(name, options) do |block, i|
88
+ options[:number] = number + i if number && i
89
+ tm = test_methods.ac_tml.ac_test.functional_test
90
+ ts = test_suites.run(name, options)
91
+ ts.test_method = tm
92
+ ts.levels = options.delete(:pin_levels) if options[:pin_levels]
93
+ ts.comment = options.delete(:comment) || flow.active_description
94
+ if block
95
+ ts.pattern = "#{name}_b#{i}"
96
+ else
97
+ ts.pattern = name.to_s
98
+ # if options[:cz_setup]
99
+ # flow.cz(ins, options[:cz_setup], options)
100
+ # else
101
+ # end
102
+ end
103
+ flow.test ts, options
104
+ end
105
+ else
106
+ func(name, options)
107
+ end
108
+ end
109
+
80
110
  def block_loop(name, options)
81
111
  if options[:by_block]
82
112
  if tester.j750? || tester.uflex?
@@ -1,5 +1,5 @@
1
1
  # This flow is used to test custom test method API
2
- Flow.create interface: 'OrigenTesters::Test::CustomTestInterface' do
2
+ Flow.create interface: 'OrigenTesters::Test::CustomTestInterface', flow_description: '' do
3
3
 
4
4
  custom :test1, number: 30000
5
5
 
@@ -4,6 +4,7 @@
4
4
  # to guarantee that the test ID references work when sub-flows are involved.
5
5
  # This flow provides a full checkout of all flow control methods.
6
6
  Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Control Testing" do
7
+ flow.flow_description = 'Flow to exercise the Flow Control API' if tester.v93k?
7
8
 
8
9
  self.resources_filename = 'flow_control'
9
10
 
@@ -431,6 +432,16 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Contro
431
432
  log 'Volatile if combiner test case'
432
433
  func :test1, if_flag: :$Alarm, number: 51940
433
434
  func :test2, unless_flag: :$Alarm, number: 51950
435
+
436
+ # The is auto-generated comment from hashtag
437
+ func_with_comment :test1
438
+
439
+ cc 'The is auto-generated comment from cc'
440
+ func_with_comment :test1
441
+
442
+ log 'Use bin_attrs to set not_over_on'
443
+ func :test1n, number: 51960, bin: 12, bin_attrs: { not_over_on: true }
444
+
434
445
  end
435
446
 
436
447
  log 'Test the block form of expressing if passed/failed dependents'
@@ -462,4 +473,5 @@ Flow.create interface: 'OrigenTesters::Test::Interface', flow_name: "Flow Contro
462
473
  import 'components/small', number: 54000
463
474
  end
464
475
  end
476
+
465
477
  end
@@ -2,7 +2,7 @@
2
2
  # passed in here, iterators and other
3
3
  # argument passing will be supported
4
4
  # similar to Pattern.create.
5
- Flow.create interface: 'OrigenTesters::Test::Interface' do
5
+ Flow.create interface: 'OrigenTesters::Test::Interface', flow_description: 'Probe1 Main' do
6
6
 
7
7
  self.resources_filename = 'prb1'
8
8
 
@@ -3,6 +3,7 @@
3
3
  # argument passing will be supported
4
4
  # similar to Pattern.create.
5
5
  Flow.create interface: 'OrigenTesters::Test::Interface' do
6
+ flow.flow_description = '' if tester.v93k?
6
7
 
7
8
  # Instantiate tests via the
8
9
  # interface
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen_testers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.3
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-16 00:00:00.000000000 Z
11
+ date: 2019-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '1.1'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 1.1.2
50
+ version: 1.1.3
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: '1.1'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 1.1.2
60
+ version: 1.1.3
61
61
  description:
62
62
  email:
63
63
  - stephen.f.mcginty@gmail.com
@@ -392,7 +392,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
392
  version: '0'
393
393
  requirements: []
394
394
  rubyforge_project:
395
- rubygems_version: 2.6.7
395
+ rubygems_version: 2.7.7
396
396
  signing_key:
397
397
  specification_version: 4
398
398
  summary: This plugin provides Origen tester models to drive ATE type testers like