Class: OrigenTesters::SmartestBasedTester::Base::TestSuites

Inherits:
Object
  • Object
show all
Defined in:
lib/origen_testers/smartest_based_tester/base/test_suites.rb

Direct Known Subclasses

V93K::TestSuites

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(flow) ⇒ TestSuites

Returns a new instance of TestSuites.



10
11
12
13
14
15
16
17
18
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 10

def initialize(flow)
  @flow = flow
  @collection = []
  @existing_names = {}
  # Test names also have to be unique vs. the current flow name
  if tester.smt8?
    @existing_names[flow.filename.sub('.flow', '').to_s] = true
  end
end

Instance Attribute Details

#collectionObject

Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 8

def collection
  @collection
end

#flowObject

Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet



8
9
10
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 8

def flow
  @flow
end

Instance Method Details

#add(name, options = {}) ⇒ Object Also known as: run, run_and_branch



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 24

def add(name, options = {})
  symbol = name.is_a?(Symbol)
  name = make_unique(name)
  # Ensure names given as a symbol stay as a symbol, this is more for
  # alignment to existing test cases than anything else
  name = name.to_sym if symbol
  suite = platform::TestSuite.new(name, options)
  @collection << suite
  # c = Origen.interface.consume_comments
  # Origen.interface.descriptions.add_for_test_definition(name, c)
  suite
end

#filenameObject



20
21
22
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 20

def filename
  flow.filename
end

#finalizeObject



43
44
45
46
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 43

def finalize
  # collection.each do |suite|
  # end
end

#platformObject



39
40
41
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 39

def platform
  Origen.interface.platform
end

#sorted_collectionObject



48
49
50
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 48

def sorted_collection
  @collection.sort_by { |ts| ts.name.to_s }
end