origen_testers 0.52.3 → 0.52.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5349ea4cd6f5b1ed7997b2565c6eda09ad601070a71195d40375d1f70faab52d
4
- data.tar.gz: 571441a791984b34c8fe1205a05ede6fe1b6f89973d090fc2e6f7ba52da51a35
3
+ metadata.gz: 68bd4c35fef793a404ccab7d41d8212fccbdc69e2b92f7cbcbf1c711cca27b64
4
+ data.tar.gz: d641609bc1bccd7476dbbdce14b01745726bfdc66062709d2991f3cdf8dd6d8c
5
5
  SHA512:
6
- metadata.gz: 1b133340695a1ddab2db3f1e651748b15eebeb1f524866efcf04e1f5ca45bbfacfd753be0a31cd5b6c99b51b47df4c78229c09699c4271c4b03c57ef8760bcf7
7
- data.tar.gz: 45fd99e42edb9e438ec6930eeb6bc4a492e8f70f957cae8ffb2187863087c39b8f0bf97adfac9c6330e1374ebf457b158eddcbeca194d2affbd5fb1f0d30e355
6
+ metadata.gz: df597ce4879df80783faa634975b7c5531594d60a6f230fc6495927a384ea56e2608f004d3ae5ad4ddbe9cc31609324e4c2f0b410aaf9a003e148082e50f2431
7
+ data.tar.gz: f3f6c2d67eabb103d31f375262729cceb99170adaba9f38d2f567fbff6ad6b6c92cdf1708aebfe77dfdb761642304a96a642f8f244cc7f0709683a0a06acf1c4
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module OrigenTesters
2
2
  MAJOR = 0
3
3
  MINOR = 52
4
- BUGFIX = 3
4
+ BUGFIX = 5
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -626,37 +626,32 @@ module OrigenTesters::ATP
626
626
  end
627
627
 
628
628
  def loop(*args, &block)
629
- if args[0].except(:source_file, :source_line_number).empty?
630
- # not a flow api call, just a loop block
631
- super(&block)
632
- else
633
- unless args[0].keys.include?(:from) && args[0].keys.include?(:to)
634
- fail 'Loop must specify :from, :to'
635
- end
636
- # assume 1 if :step not provided
637
- unless args[0].keys.include?(:step)
638
- args[0][:step] = 1
639
- end
640
- # assume 1 if :test_num_inc not provided
641
- unless args[0].keys.include?(:test_num_inc)
642
- args[0][:test_num_inc] = 1
643
- end
644
- # Add node for set of flag to be used for loop
645
- unless args[0][:var].nil?
646
- unless tester.smt8?
647
- set(args[0][:var], 0)
648
- end
629
+ unless args[0].keys.include?(:from) && args[0].keys.include?(:to)
630
+ fail 'Loop must specify :from, :to'
631
+ end
632
+ # assume 1 if :step not provided
633
+ unless args[0].keys.include?(:step)
634
+ args[0][:step] = 1
635
+ end
636
+ # assume 1 if :test_num_inc not provided
637
+ unless args[0].keys.include?(:test_num_inc)
638
+ args[0][:test_num_inc] = 1
639
+ end
640
+ # Add node for set of flag to be used for loop
641
+ unless args[0][:var].nil?
642
+ unless tester.smt8?
643
+ set(args[0][:var], 0)
649
644
  end
650
- extract_meta!(options) do
651
- apply_conditions(options) do
652
- # always pass 5-element array to loop node to simplify downstream parser
653
- # element, 'var', will be nil if not specified by loop call
654
- params = [args[0][:from], args[0][:to], args[0][:step], args[0][:var], args[0][:test_num_inc]]
645
+ end
646
+ extract_meta!(options) do
647
+ apply_conditions(options) do
648
+ # always pass 5-element array to loop node to simplify downstream parser
649
+ # element, 'var', will be nil if not specified by loop call
650
+ params = [args[0][:from], args[0][:to], args[0][:step], args[0][:var], args[0][:test_num_inc]]
655
651
 
656
- node = n(:loop, params)
657
- node = append_to(node) { block.call }
658
- node
659
- end
652
+ node = n(:loop, params)
653
+ node = append_to(node) { block.call }
654
+ node
660
655
  end
661
656
  end
662
657
  end
@@ -9,7 +9,7 @@ module OrigenTesters::ATP
9
9
  end
10
10
 
11
11
  ([:test, :bin, :pass, :continue, :cz, :log, :sub_test, :volatile, :add_global_flag, :set_flag, :unset_flag, :add_flag, :set, :enable, :disable, :render,
12
- :context_changed?, :ids, :describe_bin, :describe_softbin, :describe_soft_bin, :loop, :add_auxiliary_flow] +
12
+ :context_changed?, :ids, :describe_bin, :describe_softbin, :describe_soft_bin, :add_auxiliary_flow] +
13
13
  OrigenTesters::ATP::Flow::CONDITION_KEYS.keys + OrigenTesters::ATP::Flow::RELATIONAL_OPERATORS).each do |method|
14
14
  define_method method do |*args, &block|
15
15
  options = args.pop if args.last.is_a?(Hash)
@@ -23,6 +23,19 @@ module OrigenTesters::ATP
23
23
 
24
24
  alias_method :logprint, :log
25
25
 
26
+ def loop(*args, &block)
27
+ if args.empty?
28
+ super(&block)
29
+ else
30
+ options = args.pop if args.last.is_a?(Hash)
31
+ options ||= {}
32
+ add_meta!(options) if respond_to?(:add_meta!, true)
33
+ add_description!(options) if respond_to?(:add_description!, true)
34
+ args << options
35
+ atp.send(:loop, *args, &block)
36
+ end
37
+ end
38
+
26
39
  def lo_limit(value, options)
27
40
  {
28
41
  value: value,
@@ -188,6 +188,9 @@ module OrigenTesters
188
188
  if smt8?
189
189
  return unless top_level? || options[:called_by_top_level]
190
190
  super
191
+ # Refresh the ast before finalized gets set to true
192
+ # If ast gets called by the user the finalized flag will lock it to the incorrect value
193
+ ast
191
194
  @finalized = true
192
195
  # All flows have now been executed and the top-level contains the final AST.
193
196
  # The AST contained in each child flow may not be complete since it has not been subject to the
@@ -124,7 +124,7 @@ module OrigenTesters
124
124
  # Guarentee hash is using all symbol keys
125
125
  # Since we cannot guarentee ruby version is greater than 2.5, we have to use an older syntax to
126
126
  value_hash = value_hash.inject({}) { |memo, (k, v)| memo[k.to_sym] = v; memo }
127
- nested_key = nested_param.first.to_sym
127
+ nested_key = nested_param.first.to_s.gsub('.', '_').to_sym
128
128
  nested_key_underscore = nested_key.to_s.underscore.to_sym
129
129
  nested_params_accepted_keys << nested_key
130
130
  nested_params_accepted_keys << nested_key_underscore
@@ -57,14 +57,16 @@ module OrigenTesters
57
57
  'hashParameter': [{ param_name0: [:string, 'NO'], param_name1: [:integer, 0] }],
58
58
  'hashParameter2': [{ param_name0: [:string, 'NO'], param_name1: [:integer, 0] }],
59
59
  'nestedHashParameter': [{
60
- param_name0: [:string, ''],
61
- param_list_strings: [:list_strings, %w(E1 E2)],
62
- param_list_classes: [:list_classes, %w(E1 E2)],
63
- param_name1: [{
64
- param_name_int: [:integer, 0],
65
- param_name_double: [:double, 0],
66
- param_list_strings: [:list_strings, %w(E1 E2)],
67
- param_list_classes: [:list_classes, %w(E1 E2)]
60
+ param_name0: [:string, ''],
61
+ param_list_strings: [:list_strings, %w(E1 E2)],
62
+ param_list_classes: [:list_classes, %w(E1 E2)],
63
+ 'param_group.param0': [:string, ''],
64
+ param_name1: [{
65
+ param_name_int: [:integer, 0],
66
+ param_name_double: [:double, 0],
67
+ param_list_strings: [:list_strings, %w(E1 E2)],
68
+ param_list_classes: [:list_classes, %w(E1 E2)],
69
+ 'param_group.param1': [:string, '']
68
70
  }]
69
71
  }],
70
72
  'nestedHashParameter2': [{
@@ -320,11 +322,13 @@ module OrigenTesters
320
322
  }
321
323
  tm.nestedHashParameter = {
322
324
  my_param_name0: {
323
- param_name0: 'hello',
324
- param_name1: {
325
+ param_name0: 'hello',
326
+ param_group_param0: 'test_group',
327
+ param_name1: {
325
328
  my_param_name1: {
326
- param_name_int: '1',
327
- param_name_double: '1.0'
329
+ param_name_int: '1',
330
+ param_name_double: '1.0',
331
+ param_group_param1: 'test_nested_group'
328
332
  },
329
333
  my_param_name2: {
330
334
  param_name_int: 2,
@@ -375,6 +375,7 @@ end
375
375
  Indicating step value is optional, default is 1.
376
376
 
377
377
  These loops can also be nested:
378
+
378
379
  ~~~ruby
379
380
  loop from: 0, to: 9, step: 2, var: '$LOOP_VARIABLE1'do
380
381
  loop from: 1, to: 10, step: 1, var: '$LOOP_VARIABLE2' do
@@ -386,6 +387,7 @@ end
386
387
  ~~~
387
388
 
388
389
  You can also indicate a test number increment if desired (default is 1):
390
+
389
391
  ~~~ruby
390
392
  loop from: 0, to: 5, var: '$LOOP_VARIABLE', test_num_inc: 2 do
391
393
  func :test_myloop3, number: 56200
@@ -393,6 +395,7 @@ end
393
395
  ~~~
394
396
 
395
397
  You can also provide a variable starting point:
398
+
396
399
  ~~~ruby
397
400
  loop from: '$TEST_VARIABLE', to: 5, var: '$LOOP_VARIABLE' do
398
401
  func :test_myloop6, number: 56600
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.52.3
4
+ version: 0.52.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-20 00:00:00.000000000 Z
11
+ date: 2024-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen
@@ -615,7 +615,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
615
615
  - !ruby/object:Gem::Version
616
616
  version: '0'
617
617
  requirements: []
618
- rubygems_version: 3.2.3
618
+ rubygems_version: 3.4.10
619
619
  signing_key:
620
620
  specification_version: 4
621
621
  summary: This plugin provides Origen tester models to drive ATE type testers like