origen 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/origen +3 -1
- data/config/boot.rb +1 -7
- data/config/commands.rb +0 -1
- data/config/version.rb +2 -2
- data/lib/c99/{j750_interface.rb → ate_interface.rb} +3 -11
- data/lib/c99/doc_interface.rb +1 -1
- data/lib/origen.rb +9 -30
- data/lib/origen/application.rb +10 -8
- data/lib/origen/application/configuration.rb +13 -26
- data/lib/origen/application/plugins.rb +122 -0
- data/lib/origen/application/plugins_manager.rb +16 -254
- data/lib/origen/application/release.rb +2 -2
- data/lib/origen/application/runner.rb +2 -4
- data/lib/origen/chips.rb +0 -0
- data/lib/origen/chips/chip.rb +0 -0
- data/lib/origen/chips/design_entry.rb +0 -0
- data/lib/origen/chips/doc_entry.rb +0 -0
- data/lib/origen/chips/note.rb +0 -0
- data/lib/origen/commands.rb +4 -44
- data/lib/origen/commands/compile.rb +1 -2
- data/lib/origen/commands/generate.rb +1 -1
- data/lib/origen/commands/interactive.rb +1 -2
- data/lib/origen/commands/plugin.rb +49 -56
- data/lib/origen/commands/program.rb +1 -1
- data/lib/origen/commands/rc.rb +2 -2
- data/lib/origen/commands/version.rb +2 -17
- data/lib/origen/commands_global.rb +3 -0
- data/lib/origen/file_handler.rb +10 -10
- data/lib/origen/generator.rb +1 -1
- data/lib/origen/generator/job.rb +1 -1
- data/lib/origen/generator/pattern.rb +2 -2
- data/lib/origen/generator/pattern_finder.rb +10 -9
- data/lib/origen/pins/pin.rb +0 -0
- data/lib/origen/regression_manager.rb +0 -0
- data/lib/origen/remote_manager.rb +2 -8
- data/lib/origen/revision_control/design_sync.rb +0 -0
- data/lib/origen/revision_control/git.rb +0 -0
- data/lib/origen/specs.rb +0 -0
- data/lib/origen/specs/checkers.rb +0 -0
- data/lib/origen/specs/creation_info.rb +0 -0
- data/lib/origen/specs/exhibit.rb +0 -0
- data/lib/origen/specs/spec.rb +0 -0
- data/lib/origen/utility.rb +0 -1
- data/lib/origen/utility/diff.rb +0 -0
- metadata +42 -119
- data/lib/origen/import_manager.rb +0 -596
- data/lib/origen/nvm.rb +0 -6
- data/lib/origen/nvm/block_array.rb +0 -72
- data/lib/origen/tester.rb +0 -56
- data/lib/origen/tester/api.rb +0 -277
- data/lib/origen/tester/bdm/bdm.rb +0 -25
- data/lib/origen/tester/doc/doc.rb +0 -226
- data/lib/origen/tester/doc/generator.rb +0 -126
- data/lib/origen/tester/doc/generator/flow.rb +0 -71
- data/lib/origen/tester/doc/generator/flow_line.rb +0 -203
- data/lib/origen/tester/doc/generator/test.rb +0 -68
- data/lib/origen/tester/doc/generator/test_group.rb +0 -66
- data/lib/origen/tester/doc/generator/tests.rb +0 -47
- data/lib/origen/tester/doc/model.rb +0 -162
- data/lib/origen/tester/generator.rb +0 -271
- data/lib/origen/tester/generator/flow_control_api.rb +0 -606
- data/lib/origen/tester/generator/identity_map.rb +0 -25
- data/lib/origen/tester/generator/placeholder.rb +0 -13
- data/lib/origen/tester/generator/test_numberer.rb +0 -25
- data/lib/origen/tester/interface.rb +0 -154
- data/lib/origen/tester/j750/files.rb +0 -45
- data/lib/origen/tester/j750/generator.rb +0 -203
- data/lib/origen/tester/j750/generator/flow.rb +0 -123
- data/lib/origen/tester/j750/generator/flow_line.rb +0 -288
- data/lib/origen/tester/j750/generator/patgroup.rb +0 -111
- data/lib/origen/tester/j750/generator/patgroups.rb +0 -41
- data/lib/origen/tester/j750/generator/patset.rb +0 -111
- data/lib/origen/tester/j750/generator/patsets.rb +0 -41
- data/lib/origen/tester/j750/generator/templates/flow.txt.erb +0 -9
- data/lib/origen/tester/j750/generator/templates/instances.txt.erb +0 -16
- data/lib/origen/tester/j750/generator/templates/patgroups.txt.erb +0 -8
- data/lib/origen/tester/j750/generator/templates/patsets.txt.erb +0 -10
- data/lib/origen/tester/j750/generator/test_instance.rb +0 -846
- data/lib/origen/tester/j750/generator/test_instance_group.rb +0 -60
- data/lib/origen/tester/j750/generator/test_instances.rb +0 -182
- data/lib/origen/tester/j750/j750.rb +0 -845
- data/lib/origen/tester/j750/j750_hpt.rb +0 -35
- data/lib/origen/tester/j750/parser.rb +0 -104
- data/lib/origen/tester/j750/parser/ac_spec.rb +0 -11
- data/lib/origen/tester/j750/parser/ac_specs.rb +0 -0
- data/lib/origen/tester/j750/parser/dc_spec.rb +0 -36
- data/lib/origen/tester/j750/parser/dc_specs.rb +0 -50
- data/lib/origen/tester/j750/parser/descriptions.rb +0 -340
- data/lib/origen/tester/j750/parser/flow.rb +0 -111
- data/lib/origen/tester/j750/parser/flow_line.rb +0 -207
- data/lib/origen/tester/j750/parser/flows.rb +0 -23
- data/lib/origen/tester/j750/parser/pattern_set.rb +0 -94
- data/lib/origen/tester/j750/parser/pattern_sets.rb +0 -33
- data/lib/origen/tester/j750/parser/test_instance.rb +0 -322
- data/lib/origen/tester/j750/parser/test_instances.rb +0 -26
- data/lib/origen/tester/j750/parser/timeset.rb +0 -15
- data/lib/origen/tester/j750/parser/timesets.rb +0 -0
- data/lib/origen/tester/jlink/jlink.rb +0 -33
- data/lib/origen/tester/parser.rb +0 -24
- data/lib/origen/tester/parser/description_lookup.rb +0 -64
- data/lib/origen/tester/parser/searchable_array.rb +0 -32
- data/lib/origen/tester/parser/searchable_hash.rb +0 -32
- data/lib/origen/tester/time.rb +0 -338
- data/lib/origen/tester/timing.rb +0 -253
- data/lib/origen/tester/ultraflex/files.rb +0 -45
- data/lib/origen/tester/ultraflex/generator.rb +0 -200
- data/lib/origen/tester/ultraflex/generator/flow.rb +0 -119
- data/lib/origen/tester/ultraflex/generator/flow_line.rb +0 -269
- data/lib/origen/tester/ultraflex/generator/patgroup.rb +0 -111
- data/lib/origen/tester/ultraflex/generator/patgroups.rb +0 -41
- data/lib/origen/tester/ultraflex/generator/patset.rb +0 -111
- data/lib/origen/tester/ultraflex/generator/patsets.rb +0 -41
- data/lib/origen/tester/ultraflex/generator/templates/flow.txt.erb +0 -9
- data/lib/origen/tester/ultraflex/generator/templates/instances.txt.erb +0 -16
- data/lib/origen/tester/ultraflex/generator/templates/patgroups.txt.erb +0 -8
- data/lib/origen/tester/ultraflex/generator/templates/patsets.txt.erb +0 -10
- data/lib/origen/tester/ultraflex/generator/test_instance.rb +0 -622
- data/lib/origen/tester/ultraflex/generator/test_instance_group.rb +0 -60
- data/lib/origen/tester/ultraflex/generator/test_instances.rb +0 -174
- data/lib/origen/tester/ultraflex/parser.rb +0 -104
- data/lib/origen/tester/ultraflex/parser/ac_spec.rb +0 -11
- data/lib/origen/tester/ultraflex/parser/ac_specs.rb +0 -0
- data/lib/origen/tester/ultraflex/parser/dc_spec.rb +0 -36
- data/lib/origen/tester/ultraflex/parser/dc_specs.rb +0 -50
- data/lib/origen/tester/ultraflex/parser/descriptions.rb +0 -342
- data/lib/origen/tester/ultraflex/parser/flow.rb +0 -111
- data/lib/origen/tester/ultraflex/parser/flow_line.rb +0 -207
- data/lib/origen/tester/ultraflex/parser/flows.rb +0 -23
- data/lib/origen/tester/ultraflex/parser/pattern_set.rb +0 -94
- data/lib/origen/tester/ultraflex/parser/pattern_sets.rb +0 -33
- data/lib/origen/tester/ultraflex/parser/test_instance.rb +0 -262
- data/lib/origen/tester/ultraflex/parser/test_instances.rb +0 -26
- data/lib/origen/tester/ultraflex/parser/timeset.rb +0 -15
- data/lib/origen/tester/ultraflex/parser/timesets.rb +0 -0
- data/lib/origen/tester/ultraflex/ultraflex.rb +0 -759
- data/lib/origen/tester/v93k/generator.rb +0 -80
- data/lib/origen/tester/v93k/generator/flow.rb +0 -63
- data/lib/origen/tester/v93k/generator/flow_node.rb +0 -17
- data/lib/origen/tester/v93k/generator/flow_node/print.rb +0 -10
- data/lib/origen/tester/v93k/generator/pattern.rb +0 -16
- data/lib/origen/tester/v93k/generator/pattern_master.rb +0 -54
- data/lib/origen/tester/v93k/generator/templates/_test_method.txt.erb +0 -6
- data/lib/origen/tester/v93k/generator/templates/_test_suite.txt.erb +0 -11
- data/lib/origen/tester/v93k/generator/templates/template.flow.erb +0 -121
- data/lib/origen/tester/v93k/generator/templates/template.pmfl.erb +0 -9
- data/lib/origen/tester/v93k/generator/test_function.rb +0 -103
- data/lib/origen/tester/v93k/generator/test_functions.rb +0 -79
- data/lib/origen/tester/v93k/generator/test_method.rb +0 -46
- data/lib/origen/tester/v93k/generator/test_methods.rb +0 -75
- data/lib/origen/tester/v93k/generator/test_suite.rb +0 -54
- data/lib/origen/tester/v93k/generator/test_suites.rb +0 -65
- data/lib/origen/tester/v93k/v93k.rb +0 -420
- data/lib/origen/tester/vector.rb +0 -86
- data/lib/origen/tester/vector_generator.rb +0 -637
- data/lib/origen/tester/vector_pipeline.rb +0 -150
- data/lib/origen/utility/design_sync.rb +0 -494
- data/lib/origen/version_checker.rb +0 -117
@@ -1,126 +0,0 @@
|
|
1
|
-
require 'active_support/concern'
|
2
|
-
|
3
|
-
module Origen
|
4
|
-
module Tester
|
5
|
-
class Doc
|
6
|
-
module Generator
|
7
|
-
extend ActiveSupport::Concern
|
8
|
-
|
9
|
-
autoload :Test, 'origen/tester/doc/generator/test'
|
10
|
-
autoload :TestGroup, 'origen/tester/doc/generator/test_group'
|
11
|
-
autoload :Tests, 'origen/tester/doc/generator/tests'
|
12
|
-
autoload :Flow, 'origen/tester/doc/generator/flow'
|
13
|
-
autoload :FlowLine, 'origen/tester/doc/generator/flow_line'
|
14
|
-
autoload :Placeholder, 'origen/tester/generator/placeholder'
|
15
|
-
|
16
|
-
included do
|
17
|
-
include Origen::Tester::Interface # adds the interface helpers/Origen hook-up
|
18
|
-
include Origen::Tester::Generator::FlowControlAPI::Interface
|
19
|
-
PLATFORM = Origen::Tester::Doc
|
20
|
-
end
|
21
|
-
|
22
|
-
# Returns the current flow (as defined by the name of the current top
|
23
|
-
# level flow source file).
|
24
|
-
#
|
25
|
-
# Pass in a filename argument to have a specific flow returned instead.
|
26
|
-
#
|
27
|
-
# If the flow does not exist yet it will be created.
|
28
|
-
def flow(filename = nil)
|
29
|
-
unless filename
|
30
|
-
if Origen.file_handler.current_file
|
31
|
-
filename = Origen.file_handler.current_file.basename('.rb').to_s
|
32
|
-
else
|
33
|
-
filename = 'anonymous'
|
34
|
-
end
|
35
|
-
end
|
36
|
-
f = filename.to_sym
|
37
|
-
return flows[f] if flows[f]
|
38
|
-
p = Flow.new
|
39
|
-
p.inhibit_output if Origen.interface.resources_mode?
|
40
|
-
p.filename = f
|
41
|
-
flows[f] = p
|
42
|
-
end
|
43
|
-
|
44
|
-
# @api private
|
45
|
-
def at_flow_start
|
46
|
-
end
|
47
|
-
|
48
|
-
# @api private
|
49
|
-
def at_run_start
|
50
|
-
flow.at_run_start
|
51
|
-
@@tests = nil
|
52
|
-
@@flows = nil
|
53
|
-
end
|
54
|
-
alias_method :reset_globals, :at_run_start
|
55
|
-
|
56
|
-
# Returns a container for all generated tests.
|
57
|
-
def tests
|
58
|
-
@@tests ||= Tests.new
|
59
|
-
end
|
60
|
-
alias_method :test_instances, :tests
|
61
|
-
|
62
|
-
# Returns a hash containing all flows
|
63
|
-
def flows
|
64
|
-
@@flows ||= {}
|
65
|
-
end
|
66
|
-
|
67
|
-
# Returns an array containing all sheet generators where a sheet generator is a flow,
|
68
|
-
# test instance, patset or pat group sheet.
|
69
|
-
# All Origen program generators must implement this method
|
70
|
-
def sheet_generators # :nodoc:
|
71
|
-
g = []
|
72
|
-
[flows].each do |sheets|
|
73
|
-
sheets.each do |_name, sheet|
|
74
|
-
g << sheet
|
75
|
-
end
|
76
|
-
end
|
77
|
-
g
|
78
|
-
end
|
79
|
-
|
80
|
-
# Returns an array containing all flow generators.
|
81
|
-
# All Origen program generators must implement this method
|
82
|
-
def flow_generators
|
83
|
-
g = []
|
84
|
-
flows.each do |_name, sheet|
|
85
|
-
g << sheet
|
86
|
-
end
|
87
|
-
g
|
88
|
-
end
|
89
|
-
|
90
|
-
# The source of all program files is passed in here before executing.
|
91
|
-
# This will replace all comments with a method call containing the comment so that
|
92
|
-
# they can be captured.
|
93
|
-
def filter_source(source) # :nodoc:
|
94
|
-
src = ''
|
95
|
-
source.split(/\r?\n/).each do |line|
|
96
|
-
if line !~ /^\s*#-/ && line =~ /^\s*#(.*)/
|
97
|
-
comment = Regexp.last_match[1].gsub("'", "\\\\'")
|
98
|
-
src << "Origen.interface.doc_comments_capture('#{comment}')\n"
|
99
|
-
else
|
100
|
-
src << "#{line}\n"
|
101
|
-
end
|
102
|
-
end
|
103
|
-
src
|
104
|
-
end
|
105
|
-
|
106
|
-
def doc_comments_capture(comment)
|
107
|
-
doc_comments << "#{comment}"
|
108
|
-
end
|
109
|
-
|
110
|
-
def doc_comments
|
111
|
-
@doc_comments ||= []
|
112
|
-
end
|
113
|
-
|
114
|
-
def doc_comments_consume
|
115
|
-
c = doc_comments
|
116
|
-
doc_comments_discard
|
117
|
-
c
|
118
|
-
end
|
119
|
-
|
120
|
-
def doc_comments_discard
|
121
|
-
@doc_comments = []
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
module Origen
|
2
|
-
module Tester
|
3
|
-
class Doc
|
4
|
-
module Generator
|
5
|
-
class Flow
|
6
|
-
include Origen::Tester::Generator
|
7
|
-
include Origen::Tester::Generator::FlowControlAPI
|
8
|
-
|
9
|
-
OUTPUT_POSTFIX = 'flow'
|
10
|
-
OUTPUT_EXTENSION = 'yaml'
|
11
|
-
|
12
|
-
def add(type, options = {})
|
13
|
-
preserve_comments = options.delete(:preserve_comments)
|
14
|
-
line = track_relationships(options) do |options|
|
15
|
-
FlowLine.new(type, options)
|
16
|
-
end
|
17
|
-
collection << line unless Origen.interface.resources_mode?
|
18
|
-
if preserve_comments
|
19
|
-
line.description = Origen.interface.doc_comments
|
20
|
-
else
|
21
|
-
line.description = Origen.interface.doc_comments_consume
|
22
|
-
end
|
23
|
-
line
|
24
|
-
end
|
25
|
-
|
26
|
-
def start_section(options = {})
|
27
|
-
l = FlowLine.new(:section_start, options)
|
28
|
-
if options[:name]
|
29
|
-
desc = [options[:name]]
|
30
|
-
else
|
31
|
-
desc = []
|
32
|
-
end
|
33
|
-
l.description = desc + Origen.interface.doc_comments_consume
|
34
|
-
collection << l
|
35
|
-
end
|
36
|
-
|
37
|
-
def stop_section(options = {})
|
38
|
-
collection << FlowLine.new(:section_stop, options)
|
39
|
-
end
|
40
|
-
|
41
|
-
def test(instance, options = {})
|
42
|
-
options = save_context(options)
|
43
|
-
add(:test, { test: instance }.merge(options))
|
44
|
-
end
|
45
|
-
|
46
|
-
def set_device(options = {})
|
47
|
-
add(:set_device, options)
|
48
|
-
end
|
49
|
-
|
50
|
-
def to_yaml(options = {})
|
51
|
-
collection.map { |l| l.to_yaml(options) }
|
52
|
-
end
|
53
|
-
|
54
|
-
def render(file, options = {})
|
55
|
-
options[:file] = file
|
56
|
-
add(:render, options)
|
57
|
-
end
|
58
|
-
|
59
|
-
def skip(identifier = nil, options = {})
|
60
|
-
identifier, options = nil, identifier if identifier.is_a?(Hash)
|
61
|
-
identifier = generate_unique_label(identifier)
|
62
|
-
options[:test] = identifier
|
63
|
-
add(:branch, options)
|
64
|
-
yield
|
65
|
-
add(:label, test: identifier)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,203 +0,0 @@
|
|
1
|
-
module Origen
|
2
|
-
module Tester
|
3
|
-
class Doc
|
4
|
-
module Generator
|
5
|
-
class FlowLine
|
6
|
-
attr_accessor :type, :id, :test, :context, :attributes, :description
|
7
|
-
|
8
|
-
def initialize(type, attrs = {})
|
9
|
-
@type = type
|
10
|
-
@test = attrs.delete(:test)
|
11
|
-
@context = {}
|
12
|
-
@attributes = {}
|
13
|
-
flow_control_options = Origen.interface.extract_flow_control_options!(attrs)
|
14
|
-
flow_control_options.each do |opt, val|
|
15
|
-
send("#{opt}=", val)
|
16
|
-
end
|
17
|
-
attrs.each do |attribute, val|
|
18
|
-
@attributes[attribute] = val
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def to_yaml(options = {})
|
23
|
-
options = {
|
24
|
-
include_descriptions: true
|
25
|
-
}.merge(options)
|
26
|
-
y = {
|
27
|
-
'type' => @type,
|
28
|
-
'description' => description,
|
29
|
-
'instance' => test_to_yaml(options),
|
30
|
-
'flow' => {
|
31
|
-
'attributes' => attributes_to_yaml(options),
|
32
|
-
'context' => context_to_yaml(options)
|
33
|
-
}
|
34
|
-
}
|
35
|
-
y.delete('description') unless options[:include_descriptions]
|
36
|
-
y
|
37
|
-
end
|
38
|
-
|
39
|
-
def attributes_to_yaml(_options = {})
|
40
|
-
a = {}
|
41
|
-
@attributes.each do |name, val|
|
42
|
-
a[name.to_s] = val if val
|
43
|
-
end
|
44
|
-
a
|
45
|
-
end
|
46
|
-
|
47
|
-
def context_to_yaml(_options = {})
|
48
|
-
# Turn attribute keys into strings for prettier yaml, this includes all
|
49
|
-
# relationship meta data
|
50
|
-
c = @context.reduce({}) { |memo, (k, v)| memo[k.to_s] = v; memo }
|
51
|
-
# Now add job/enable word data
|
52
|
-
if @enable
|
53
|
-
c['if_enable'] = @enable
|
54
|
-
end
|
55
|
-
if @unless_enable
|
56
|
-
c['unless_enable'] = @unless_enable
|
57
|
-
end
|
58
|
-
unless if_jobs.empty?
|
59
|
-
c['if_jobs'] = if_jobs
|
60
|
-
end
|
61
|
-
unless unless_jobs.empty?
|
62
|
-
c['unless_jobs'] = unless_jobs
|
63
|
-
end
|
64
|
-
c
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_to_yaml(options = {})
|
68
|
-
if @test
|
69
|
-
if @test.is_a?(String) || @test.is_a?(Symbol)
|
70
|
-
{
|
71
|
-
'attributes' => {
|
72
|
-
'name' => @test.to_s
|
73
|
-
}
|
74
|
-
}
|
75
|
-
else
|
76
|
-
@test.to_yaml(options)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def method_missing(method, *args, &_block)
|
82
|
-
method = method.to_s
|
83
|
-
if method.gsub!('=', '')
|
84
|
-
@attributes[method] = args.first
|
85
|
-
else
|
86
|
-
@attributes[method]
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
def job
|
91
|
-
if !if_jobs.empty? && !unless_jobs.empty?
|
92
|
-
fail "Both if and unless jobs have been defined for test: #{parameter}"
|
93
|
-
elsif !if_jobs.empty?
|
94
|
-
if_jobs.join(',')
|
95
|
-
elsif !unless_jobs.empty?
|
96
|
-
unless_jobs.map { |j| "!#{j}" }.join(',')
|
97
|
-
else
|
98
|
-
''
|
99
|
-
end
|
100
|
-
end
|
101
|
-
alias_method :jobs, :job
|
102
|
-
|
103
|
-
def if_jobs
|
104
|
-
@if_jobs ||= []
|
105
|
-
end
|
106
|
-
|
107
|
-
def unless_jobs
|
108
|
-
@unless_jobs ||= []
|
109
|
-
end
|
110
|
-
|
111
|
-
def if_enable=(val)
|
112
|
-
@enable = val
|
113
|
-
end
|
114
|
-
alias_method :enable=, :if_enable=
|
115
|
-
alias_method :if_enabled=, :if_enable=
|
116
|
-
|
117
|
-
def unless_enable=(val)
|
118
|
-
@unless_enable = val
|
119
|
-
end
|
120
|
-
alias_method :unless_enabled=, :unless_enable=
|
121
|
-
|
122
|
-
def if_job=(jobs)
|
123
|
-
[jobs].flatten.compact.each do |job|
|
124
|
-
job = job.to_s.upcase
|
125
|
-
if job =~ /!/
|
126
|
-
self.unless_job = job
|
127
|
-
else
|
128
|
-
if_jobs << job unless if_jobs.include?(job)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
|
-
alias_method :if_jobs=, :if_job=
|
133
|
-
alias_method :add_if_jobs, :if_job=
|
134
|
-
alias_method :add_if_job, :if_job=
|
135
|
-
|
136
|
-
def unless_job=(jobs)
|
137
|
-
[jobs].flatten.compact.each do |job|
|
138
|
-
job = job.to_s.upcase
|
139
|
-
job.gsub!('!', '')
|
140
|
-
unless_jobs << job unless unless_jobs.include?(job)
|
141
|
-
end
|
142
|
-
end
|
143
|
-
alias_method :unless_jobs=, :unless_job=
|
144
|
-
alias_method :add_unless_jobs, :unless_job=
|
145
|
-
alias_method :add_unless_job, :unless_job=
|
146
|
-
|
147
|
-
def run_if_failed(id)
|
148
|
-
@context[:if_failed] = id
|
149
|
-
end
|
150
|
-
|
151
|
-
def run_if_passed(id)
|
152
|
-
@context[:if_passed] = id
|
153
|
-
end
|
154
|
-
|
155
|
-
def run_if_ran(id)
|
156
|
-
@context[:if_ran] = id
|
157
|
-
end
|
158
|
-
|
159
|
-
def run_unless_ran(id)
|
160
|
-
@context[:unless_ran] = id
|
161
|
-
end
|
162
|
-
|
163
|
-
def run_if_any_passed(parent)
|
164
|
-
@context[:if_any_passed] = parent.id
|
165
|
-
end
|
166
|
-
|
167
|
-
def run_if_all_passed(parent)
|
168
|
-
@context[:if_all_passed] = parent.id
|
169
|
-
end
|
170
|
-
|
171
|
-
def run_if_any_failed(parent)
|
172
|
-
@context[:if_any_failed] = parent.id
|
173
|
-
end
|
174
|
-
|
175
|
-
def run_if_all_failed(parent)
|
176
|
-
@context[:if_all_failed] = parent.id
|
177
|
-
end
|
178
|
-
|
179
|
-
def continue_on_fail
|
180
|
-
@attributes[:continue] = true
|
181
|
-
end
|
182
|
-
|
183
|
-
def id
|
184
|
-
@id || "#{parameter}_#{unique_counter}"
|
185
|
-
end
|
186
|
-
|
187
|
-
def unique_counter
|
188
|
-
@unique_counter ||= self.class.unique_counter
|
189
|
-
end
|
190
|
-
|
191
|
-
def self.unique_counter
|
192
|
-
@ix ||= -1
|
193
|
-
@ix += 1
|
194
|
-
end
|
195
|
-
|
196
|
-
def test?
|
197
|
-
@type == :test
|
198
|
-
end
|
199
|
-
end
|
200
|
-
end
|
201
|
-
end
|
202
|
-
end
|
203
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
module Origen
|
2
|
-
module Tester
|
3
|
-
class Doc
|
4
|
-
module Generator
|
5
|
-
class Test
|
6
|
-
attr_accessor :name, :index, :version, :append_version, :attributes
|
7
|
-
|
8
|
-
def initialize(name, attrs = {})
|
9
|
-
attrs = {}.merge(attrs) # Important to keep this to clone the original options
|
10
|
-
# so that the caller's copy if not affected by stripping
|
11
|
-
# out the flow/relation options
|
12
|
-
@attributes = {}
|
13
|
-
@append_version = true
|
14
|
-
self.name = name
|
15
|
-
Origen.interface.extract_relation_options!(attrs)
|
16
|
-
Origen.interface.extract_flow_control_options!(attrs)
|
17
|
-
attrs.each do |attribute, val|
|
18
|
-
@attributes[attribute] = val
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def to_yaml(options = {})
|
23
|
-
{
|
24
|
-
'attributes' => attributes_to_yaml(options)
|
25
|
-
}
|
26
|
-
end
|
27
|
-
|
28
|
-
def attributes_to_yaml(_options = {})
|
29
|
-
a = {}
|
30
|
-
@attributes.each do |name, val|
|
31
|
-
a[name.to_s] = val if val
|
32
|
-
end
|
33
|
-
a['name'] = name
|
34
|
-
a
|
35
|
-
end
|
36
|
-
|
37
|
-
def method_missing(method, *args, &_block)
|
38
|
-
method = method.to_s
|
39
|
-
if method.gsub!('=', '')
|
40
|
-
@attributes[method] = args.first
|
41
|
-
else
|
42
|
-
@attributes[method]
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def ==(other_test)
|
47
|
-
self.class == other_test.class &&
|
48
|
-
unversioned_name.to_s == other_test.unversioned_name.to_s &&
|
49
|
-
attributes.size == other_test.attributes.size &&
|
50
|
-
attributes.all? { |name, val| other_test.attributes[name] == val }
|
51
|
-
end
|
52
|
-
|
53
|
-
def name
|
54
|
-
if version && @append_version
|
55
|
-
"#{@name}_v#{version}"
|
56
|
-
else
|
57
|
-
@name.to_s
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
def unversioned_name
|
62
|
-
@name.to_s
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|