Module: OrigenTesters::Flow

Defined in:
lib/test_ids/origen_testers/flow.rb

Constant Summary collapse

BIN_OPTS =
[:bin, :softbin, :bin_size, :softbin_size, :number, :number_size]

Instance Method Summary collapse

Instance Method Details

#_orig_testObject

Override the flow.test method to inject our generated bin and test numbers



8
# File 'lib/test_ids/origen_testers/flow.rb', line 8

alias_method :_orig_test, :test

#test(instance, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/test_ids/origen_testers/flow.rb', line 9

def test(instance, options = {})
  if TestIds.configured?
    unless options[:test_ids] == :notrack
      options[:test_ids_flow_id] = try(:top_level).try(:id) || id

      TestIds.current_configuration.allocator.allocate(instance, options)

      unless TestIds.current_configuration.send_to_ate?
        BIN_OPTS.each do |opt|
          options.delete(opt)
        end
      end
    end
  end
  _orig_test(instance, options)
end