Sha256: 14a5d12670c99f90da115a7bcf23ae709a28e427aba0228843915b27618693b6

Contents?: true

Size: 702 Bytes

Versions: 2

Compression:

Stored size: 702 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? && options[:test_ids] != :notrack
        TestIds.current_configuration.allocator.allocate(instance, options)
      end
      if TestIds.configured?
        if TestIds.current_configuration.send_to_ate == false
          BIN_OPTS.each do |opt|
            options.delete(opt)
          end
        end
      end
      _orig_test(instance, options)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
test_ids-0.8.2 lib/test_ids/origen_testers/flow.rb
test_ids-0.8.1 lib/test_ids/origen_testers/flow.rb