Sha256: 619a5240b2813dbe07cdfcd4e7b3a16ec0fdd45eff03180025cbd7a084ba3c59

Contents?: true

Size: 767 Bytes

Versions: 7

Compression:

Stored size: 767 Bytes

Contents

require 'origen_testers/flow'
module OrigenTesters
  module Flow
    BIN_OPTS = [:bin, :softbin, :bin_size, :softbin_size, :number, :number_size]

    # Override the flow.test method to inject our generated bin and
    # test numbers
    alias_method :_orig_test, :test
    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
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
test_ids-1.2.3 lib/test_ids/origen_testers/flow.rb
test_ids-1.2.2 lib/test_ids/origen_testers/flow.rb
test_ids-1.2.1 lib/test_ids/origen_testers/flow.rb
test_ids-1.2.0 lib/test_ids/origen_testers/flow.rb
test_ids-1.1.2 lib/test_ids/origen_testers/flow.rb
test_ids-1.1.1 lib/test_ids/origen_testers/flow.rb
test_ids-1.1.0 lib/test_ids/origen_testers/flow.rb