origen_testers 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/application.rb +12 -3
- data/config/{development.rb → boot.rb} +3 -0
- data/config/version.rb +1 -1
- data/lib/origen_testers.rb +0 -1
- data/lib/origen_testers/igxl_based_tester/base.rb +4 -0
- data/lib/origen_testers/igxl_based_tester/base/custom_test_instance.rb +167 -0
- data/lib/origen_testers/igxl_based_tester/base/generator.rb +12 -0
- data/lib/origen_testers/igxl_based_tester/base/test_instance.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/base/test_instance_group.rb +8 -0
- data/lib/origen_testers/igxl_based_tester/base/test_instances.rb +31 -3
- data/lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb +37 -0
- data/lib/origen_testers/igxl_based_tester/j750/custom_test_instance.rb +32 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/custom_test_instance.rb +32 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/custom_test_instance.rb +32 -0
- data/lib/origen_testers/smartest_based_tester/base/generator.rb +1 -0
- data/lib/origen_testers/test/custom_test_interface.rb +112 -0
- data/program/custom_tests.rb +6 -0
- metadata +10 -4
- data/config/environment.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5002a6e4293e3bb9362f8c4a9266024d5ccb7cc9
|
4
|
+
data.tar.gz: b5f28a2f3267dd9210d4eca6cd414e98a44be406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e35b56a18d5fae9293e45fd624934999dc36a5b207c22f57b45c9c82a6a2939f71a6a203cfdfc4a0b613e990dabcbd7f26489783f8b6b959b32d7f1eeb834bbd
|
7
|
+
data.tar.gz: af1bd2846e6215977a45b3bb818c0b12c7e743cd21b8e6cf55506a154932ae90b69e3b47f5ef82b583b4f01a2df2096e9752aeda1ae3825e315b45f7f508c562
|
data/config/application.rb
CHANGED
@@ -34,18 +34,27 @@ class OrigenTestersApplication < Origen::Application
|
|
34
34
|
# Here you can specify an alternative directory entirely, or make it dynamic such that
|
35
35
|
# the output ends up in a setup specific directory.
|
36
36
|
config.output_directory do
|
37
|
-
|
37
|
+
dir = "#{Origen.root}/output/#{$tester.name}"
|
38
|
+
# Check if running on windows, if so, substitute :: with _
|
39
|
+
dir.gsub!("::","_") if Origen.os.windows?
|
40
|
+
dir
|
38
41
|
end
|
39
42
|
|
40
43
|
# Similary for the reference files, generally you want to setup the reference directory
|
41
44
|
# structure to mirror that of your output directory structure.
|
42
45
|
config.reference_directory do
|
43
|
-
"#{Origen.root}/.ref/#{$tester.name}"
|
46
|
+
dir = "#{Origen.root}/.ref/#{$tester.name}"
|
47
|
+
# Check if running on windows, if so, substitute :: with _
|
48
|
+
dir.gsub!("::","_") if Origen.os.windows?
|
49
|
+
dir
|
44
50
|
end
|
45
51
|
|
46
52
|
# Setting this to the spec area for testing of compiler
|
47
53
|
config.pattern_output_directory do
|
48
|
-
|
54
|
+
dir = "#{Origen.root}/spec/patterns/atp"
|
55
|
+
# Check if running on windows, if so, substitute :: with _
|
56
|
+
dir.gsub!("::","_") if Origen.os.windows?
|
57
|
+
dir
|
49
58
|
end
|
50
59
|
|
51
60
|
# Run the tests before deploying to generate test coverage numbers
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "origen_testers"
|
2
|
+
|
1
3
|
# This file is only loaded when the testers is running standalone,
|
2
4
|
# therefore anything required here will be loaded for development only
|
3
5
|
require "origen_testers/test/dut.rb"
|
@@ -10,3 +12,4 @@ require "origen_testers/test/ultraflex_interface"
|
|
10
12
|
require "origen_testers/test/j750_hpt_interface"
|
11
13
|
require "origen_testers/test/v93k_interface"
|
12
14
|
require "origen_testers/test/basic_interface"
|
15
|
+
require "origen_testers/test/custom_test_interface"
|
data/config/version.rb
CHANGED
data/lib/origen_testers.rb
CHANGED
@@ -0,0 +1,167 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module IGXLBasedTester
|
3
|
+
class Base
|
4
|
+
class CustomTestInstance
|
5
|
+
attr_accessor :type, :index, :version, :append_version, :finalize
|
6
|
+
|
7
|
+
# Returns the object representing the test instance library that the
|
8
|
+
# given test instance is defined in
|
9
|
+
attr_reader :library
|
10
|
+
|
11
|
+
def self.define
|
12
|
+
# Generate accessors for all attributes and their aliases
|
13
|
+
attrs.each do |attr|
|
14
|
+
writer = "#{attr}=".to_sym
|
15
|
+
reader = attr.to_sym
|
16
|
+
attr_reader attr.to_sym unless method_defined? reader
|
17
|
+
attr_writer attr.to_sym unless method_defined? writer
|
18
|
+
end
|
19
|
+
|
20
|
+
# Define the common aliases now, the instance type specific ones will
|
21
|
+
# be created when the instance type is known
|
22
|
+
self::TEST_INSTANCE_ALIASES.each do |_alias, val|
|
23
|
+
writer = "#{_alias}=".to_sym
|
24
|
+
reader = _alias.to_sym
|
25
|
+
unless val.is_a? Hash
|
26
|
+
unless method_defined? writer
|
27
|
+
define_method("#{_alias}=") do |v|
|
28
|
+
send("#{val}=", v)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
unless method_defined? reader
|
32
|
+
define_method("#{_alias}") do
|
33
|
+
send(val)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.attrs
|
41
|
+
@attrs ||= begin
|
42
|
+
attrs = self::TEST_INSTANCE_ATTRS.dup
|
43
|
+
|
44
|
+
self::TEST_INSTANCE_EXTRA_ARGS.times do |i|
|
45
|
+
attrs << "arg#{i}"
|
46
|
+
end
|
47
|
+
attrs << 'comment'
|
48
|
+
attrs
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def initialize(name, options = {})
|
53
|
+
@append_version = true
|
54
|
+
self.name = name
|
55
|
+
# Add any methods
|
56
|
+
if options[:methods][:methods]
|
57
|
+
methods = options[:methods][:methods]
|
58
|
+
@finalize = methods.delete(:finalize)
|
59
|
+
methods.each do |method_name, function|
|
60
|
+
var_name = "@#{method_name}".gsub(/=|\?/, '_')
|
61
|
+
instance_variable_set(var_name, function)
|
62
|
+
define_singleton_method method_name do |*args|
|
63
|
+
instance_variable_get(var_name).call(self, *args)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
# Create attributes corresponding to the test method type represented
|
68
|
+
# by this method instance
|
69
|
+
options[:methods].each do |attr, arg_default|
|
70
|
+
arg_default = [arg_default] unless arg_default.is_a?(Array)
|
71
|
+
unless attr == :aliases || attr == :methods
|
72
|
+
clean_attr = clean_attr_name(attr)
|
73
|
+
arg = arg_default[0]
|
74
|
+
default = arg_default[1]
|
75
|
+
allowed = arg_default[2]
|
76
|
+
aliases = [clean_attr]
|
77
|
+
aliases << clean_attr.underscore if clean_attr.underscore != clean_attr
|
78
|
+
aliases.each do |alias_|
|
79
|
+
define_singleton_method("#{alias_}=") do |v|
|
80
|
+
if allowed
|
81
|
+
unless allowed.include?(v)
|
82
|
+
fail "Cannot set #{alias_} to #{v}, valid values are: #{allowed.join(', ')}"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
instance_variable_set("@#{arg}", v)
|
86
|
+
end
|
87
|
+
define_singleton_method(alias_) do
|
88
|
+
instance_variable_get("@#{arg}")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
send("#{arg}=", default)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
if options[:methods][:aliases]
|
95
|
+
options[:methods][:aliases].each do |alias_, attr|
|
96
|
+
clean_attr = clean_attr_name(attr)
|
97
|
+
define_singleton_method("#{alias_}=") do |v|
|
98
|
+
send("#{clean_attr}=", v)
|
99
|
+
end
|
100
|
+
define_singleton_method(alias_) do
|
101
|
+
send(clean_attr)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
# Set the defaults
|
106
|
+
self.class::TEST_INSTANCE_DEFAULTS.each do |k, v|
|
107
|
+
send("#{k}=", v) if self.respond_to?("#{k}=", v)
|
108
|
+
end
|
109
|
+
# Finally set any initial values that have been supplied
|
110
|
+
options[:attrs].each do |k, v|
|
111
|
+
send("#{k}=", v) if respond_to?("#{k}=")
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def ==(other_instance)
|
116
|
+
self.class == other_instance.class &&
|
117
|
+
unversioned_name.to_s == other_instance.unversioned_name.to_s &&
|
118
|
+
self.class.attrs.all? do |attr|
|
119
|
+
# Exclude test name, already examined above and don't want to include
|
120
|
+
# the version in the comparison
|
121
|
+
if attr == 'test_name'
|
122
|
+
true
|
123
|
+
else
|
124
|
+
send(attr) == other_instance.send(attr)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Returns the fully formatted test instance for insertion into an instance sheet
|
130
|
+
def to_s(override_name = nil)
|
131
|
+
l = "\t"
|
132
|
+
self.class.attrs.each do |attr|
|
133
|
+
if attr == 'test_name' && override_name
|
134
|
+
l += "#{override_name}\t"
|
135
|
+
else
|
136
|
+
l += "#{send(attr)}\t"
|
137
|
+
end
|
138
|
+
end
|
139
|
+
"#{l}"
|
140
|
+
end
|
141
|
+
|
142
|
+
def name
|
143
|
+
if version && @append_version
|
144
|
+
"#{@test_name}_v#{version}"
|
145
|
+
else
|
146
|
+
@test_name.to_s
|
147
|
+
end
|
148
|
+
end
|
149
|
+
alias_method :test_name, :name
|
150
|
+
|
151
|
+
def name=(val)
|
152
|
+
self.test_name = val
|
153
|
+
end
|
154
|
+
|
155
|
+
def unversioned_name
|
156
|
+
@test_name.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
private
|
160
|
+
|
161
|
+
def clean_attr_name(name)
|
162
|
+
name.to_s.gsub(/\.|-/, '_')
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
@@ -17,6 +17,11 @@ module OrigenTesters
|
|
17
17
|
super
|
18
18
|
end
|
19
19
|
|
20
|
+
def add_til(name, methods)
|
21
|
+
custom_tils[name] = methods
|
22
|
+
end
|
23
|
+
alias_method :add_test_instance_library, :add_til
|
24
|
+
|
20
25
|
# @api private
|
21
26
|
def at_flow_start
|
22
27
|
@@test_instances_filename = nil
|
@@ -211,6 +216,13 @@ module OrigenTesters
|
|
211
216
|
end
|
212
217
|
alias_method :pat_groups, :patgroups
|
213
218
|
alias_method :pattern_groups, :patgroups
|
219
|
+
|
220
|
+
private
|
221
|
+
|
222
|
+
# Custom test instance libraries
|
223
|
+
def custom_tils
|
224
|
+
@custom_tils ||= {}
|
225
|
+
end
|
214
226
|
end
|
215
227
|
end
|
216
228
|
end
|
@@ -2,7 +2,7 @@ module OrigenTesters
|
|
2
2
|
module IGXLBasedTester
|
3
3
|
class Base
|
4
4
|
class TestInstance
|
5
|
-
attr_accessor :type, :index, :version, :append_version
|
5
|
+
attr_accessor :type, :index, :version, :append_version, :finalize
|
6
6
|
|
7
7
|
def self.define
|
8
8
|
# Generate accessors for all attributes and their aliases
|
@@ -4,6 +4,8 @@ module OrigenTesters
|
|
4
4
|
class TestInstances
|
5
5
|
include OrigenTesters::Generator
|
6
6
|
|
7
|
+
autoload :CustomTil, 'origen_testers/igxl_based_tester/base/test_instances/custom_til'
|
8
|
+
|
7
9
|
OUTPUT_POSTFIX = 'instances'
|
8
10
|
|
9
11
|
class IndexedString < ::String
|
@@ -18,7 +20,12 @@ module OrigenTesters
|
|
18
20
|
options = {
|
19
21
|
test_instance_class: platform::TestInstance
|
20
22
|
}.merge(options)
|
21
|
-
|
23
|
+
klass =
|
24
|
+
if type.is_a?(Symbol) || type.is_a?(String)
|
25
|
+
ins = options.delete(:test_instance_class).new(name, type, options)
|
26
|
+
else
|
27
|
+
ins = type
|
28
|
+
end
|
22
29
|
if @current_group
|
23
30
|
@current_group << ins
|
24
31
|
else
|
@@ -90,7 +97,7 @@ module OrigenTesters
|
|
90
97
|
|
91
98
|
def finalize(options = {}) # :nodoc:
|
92
99
|
uniq!
|
93
|
-
|
100
|
+
sort_and_finalize!
|
94
101
|
end
|
95
102
|
|
96
103
|
def uniq! # :nodoc:
|
@@ -133,11 +140,13 @@ module OrigenTesters
|
|
133
140
|
self.collection = uniques
|
134
141
|
end
|
135
142
|
|
136
|
-
def
|
143
|
+
def sort_and_finalize! # :nodoc:
|
137
144
|
# Present the instances in the final sheet in alphabetical order
|
138
145
|
collection.map!.with_index do |ins, i|
|
139
146
|
if ins.is_a?(String) # Can happen if content has been rendered in from a template
|
140
147
|
ins = IndexedString.new(ins)
|
148
|
+
else
|
149
|
+
ins.finalize.call(ins) if ins.finalize
|
141
150
|
end
|
142
151
|
ins
|
143
152
|
end
|
@@ -173,6 +182,25 @@ module OrigenTesters
|
|
173
182
|
def mto_memory(name, options = {})
|
174
183
|
add(name, :mto_memory, options)
|
175
184
|
end
|
185
|
+
|
186
|
+
# Creates an accessor for custom test method libraries the first time they are called
|
187
|
+
def method_missing(method, *args, &block)
|
188
|
+
custom_tils = Origen.interface.send(:custom_tils)
|
189
|
+
if custom_tils[method]
|
190
|
+
ti = CustomTil.new(self, custom_tils[method])
|
191
|
+
instance_variable_set "@#{method}", ti
|
192
|
+
define_singleton_method method do
|
193
|
+
instance_variable_get("@#{method}")
|
194
|
+
end
|
195
|
+
send(method)
|
196
|
+
else
|
197
|
+
super
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def respond_to?(method)
|
202
|
+
!!Origen.interface.send(:custom_tils)[method] || super
|
203
|
+
end
|
176
204
|
end
|
177
205
|
end
|
178
206
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module IGXLBasedTester
|
3
|
+
class Base
|
4
|
+
class TestInstances
|
5
|
+
# Custom Test Instance library
|
6
|
+
class CustomTil
|
7
|
+
# Returns the test_instances object for the current flow
|
8
|
+
attr_reader :test_instances
|
9
|
+
attr_reader :definitions
|
10
|
+
|
11
|
+
def initialize(test_instances, definitions)
|
12
|
+
@test_instances = test_instances
|
13
|
+
@definitions = definitions
|
14
|
+
end
|
15
|
+
|
16
|
+
def method_missing(method, *args, &block)
|
17
|
+
if definitions[method]
|
18
|
+
name = args.shift
|
19
|
+
ti = platform::CustomTestInstance.new name, methods: definitions[method].dup,
|
20
|
+
attrs: (args.first || {}),
|
21
|
+
type: method,
|
22
|
+
library: self
|
23
|
+
test_instances.add(nil, ti)
|
24
|
+
ti
|
25
|
+
else
|
26
|
+
super
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def platform
|
31
|
+
test_instances.platform
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module IGXLBasedTester
|
3
|
+
class J750
|
4
|
+
require 'origen_testers/igxl_based_tester/base/custom_test_instance'
|
5
|
+
class CustomTestInstance < Base::CustomTestInstance
|
6
|
+
# Attributes for each test instance line, first few are named directly
|
7
|
+
TEST_INSTANCE_ATTRS = %w(
|
8
|
+
test_name proc_type proc_name proc_called_as dc_category
|
9
|
+
dc_selector ac_category ac_selector
|
10
|
+
time_sets edge_sets pin_levels overlay
|
11
|
+
)
|
12
|
+
|
13
|
+
# Attributes for additional test instance arguments beyond those described above
|
14
|
+
TEST_INSTANCE_EXTRA_ARGS = 80
|
15
|
+
|
16
|
+
TEST_INSTANCE_DEFAULTS = {
|
17
|
+
proc_type: 'Other',
|
18
|
+
proc_called_as: 'VB DLL'
|
19
|
+
}
|
20
|
+
|
21
|
+
TEST_INSTANCE_ALIASES = {
|
22
|
+
name: :test_name,
|
23
|
+
time_set: :time_sets,
|
24
|
+
timeset: :time_sets,
|
25
|
+
timesets: :time_sets
|
26
|
+
}
|
27
|
+
|
28
|
+
define
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module IGXLBasedTester
|
3
|
+
class J750_HPT
|
4
|
+
require 'origen_testers/igxl_based_tester/base/custom_test_instance'
|
5
|
+
class CustomTestInstance < Base::CustomTestInstance
|
6
|
+
# Attributes for each test instance line, first few are named directly
|
7
|
+
TEST_INSTANCE_ATTRS = %w(
|
8
|
+
test_name proc_type proc_name proc_called_as dc_category
|
9
|
+
dc_selector ac_category ac_selector
|
10
|
+
time_sets edge_sets pin_levels overlay
|
11
|
+
)
|
12
|
+
|
13
|
+
# Attributes for additional test instance arguments beyond those described above
|
14
|
+
TEST_INSTANCE_EXTRA_ARGS = 80
|
15
|
+
|
16
|
+
TEST_INSTANCE_DEFAULTS = {
|
17
|
+
proc_type: 'Other',
|
18
|
+
proc_called_as: 'VB DLL'
|
19
|
+
}
|
20
|
+
|
21
|
+
TEST_INSTANCE_ALIASES = {
|
22
|
+
name: :test_name,
|
23
|
+
time_set: :time_sets,
|
24
|
+
timeset: :time_sets,
|
25
|
+
timesets: :time_sets
|
26
|
+
}
|
27
|
+
|
28
|
+
define
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module IGXLBasedTester
|
3
|
+
class UltraFLEX
|
4
|
+
require 'origen_testers/igxl_based_tester/base/custom_test_instance'
|
5
|
+
class CustomTestInstance < Base::CustomTestInstance
|
6
|
+
# Attributes for each test instance line, first few are named directly
|
7
|
+
TEST_INSTANCE_ATTRS = %w(
|
8
|
+
test_name proc_type proc_name proc_called_as dc_category
|
9
|
+
dc_selector ac_category ac_selector
|
10
|
+
time_sets edge_sets pin_levels mixedsignal_timing overlay
|
11
|
+
)
|
12
|
+
|
13
|
+
# Attributes for additional test instance arguments beyond those described above
|
14
|
+
TEST_INSTANCE_EXTRA_ARGS = 130
|
15
|
+
|
16
|
+
TEST_INSTANCE_DEFAULTS = {
|
17
|
+
proc_type: 'Other',
|
18
|
+
proc_called_as: 'VB DLL'
|
19
|
+
}
|
20
|
+
|
21
|
+
TEST_INSTANCE_ALIASES = {
|
22
|
+
name: :test_name,
|
23
|
+
time_set: :time_sets,
|
24
|
+
timeset: :time_sets,
|
25
|
+
timesets: :time_sets
|
26
|
+
}
|
27
|
+
|
28
|
+
define
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module Test
|
3
|
+
class CustomTestInterface
|
4
|
+
include OrigenTesters::ProgramGenerators
|
5
|
+
|
6
|
+
def initialize(options = {})
|
7
|
+
add_custom_til if tester.try(:igxl_based?)
|
8
|
+
add_custom_tml if tester.v93k?
|
9
|
+
end
|
10
|
+
|
11
|
+
def custom(name, options = {})
|
12
|
+
if name == :test1
|
13
|
+
if tester.try(:igxl_based?)
|
14
|
+
ti = test_instances.mylib.test_a(:custom_test1)
|
15
|
+
ti.my_arg0 = 'arg0_set'
|
16
|
+
ti.my_arg2_alias = 'curr'
|
17
|
+
ti.set_my_arg4('arg4_set_from_method')
|
18
|
+
|
19
|
+
elsif tester.v93k?
|
20
|
+
ti = test_methods.my_tml.test_a
|
21
|
+
ti.my_arg0 = 'arg0_set'
|
22
|
+
ti.my_arg2_alias = 'CURR'
|
23
|
+
ti.set_my_arg4('arg4_set_from_method')
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def add_custom_tml
|
32
|
+
add_tml :my_tml,
|
33
|
+
test_a: {
|
34
|
+
# Parameters can be defined with an underscored symbol as the name, this can be used
|
35
|
+
# if the C++ implementation follows the standard V93K convention of calling the attribute
|
36
|
+
# the camel cased version, starting with a lower-cased letter, i.e. 'testerState' in this
|
37
|
+
# first example.
|
38
|
+
# The attribute definition has two required parameters, the type and the default value.
|
39
|
+
# The type can be :string, :current, :voltage, :time, :frequency, or :integer
|
40
|
+
# An optional 3rd parameter can be supplied to give an array of allowed values. If supplied,
|
41
|
+
# Origen will raise an error upon an attempt to set it to an unlisted value.
|
42
|
+
tester_state: [:string, 'CONNECTED', %w(CONNECTED UNCHANGED)],
|
43
|
+
test_name: [:string, 'Functional'],
|
44
|
+
my_arg0: [:string, ''],
|
45
|
+
my_arg1: [:string, 'a_default_value'],
|
46
|
+
my_arg2: [:string, 'VOLT', %w(VOLT CURR)],
|
47
|
+
my_arg3: [:string, ''],
|
48
|
+
my_arg4: [:string, ''],
|
49
|
+
# In cases where the C++ library has deviated from standard attribute naming conventions
|
50
|
+
# (camel-cased with lower cased first character), the absolute attribute name can be given
|
51
|
+
# as a string.
|
52
|
+
# The Ruby/Origen accessor for these will be the underscored version, with '.' characters
|
53
|
+
# converted to underscores, e.g. tm.bad_practice, tm.really_bad_practice, etc.
|
54
|
+
'BadPractice' => [:string, 'NO', %w(NO YES)],
|
55
|
+
'Really.BadPractice' => [:string, ''],
|
56
|
+
# Attribute aliases can be defined like this:
|
57
|
+
aliases: {
|
58
|
+
my_arg2_alias: :my_arg2
|
59
|
+
},
|
60
|
+
# Define any methods you want the test method to have
|
61
|
+
methods: {
|
62
|
+
# An optional finalize function can be supplied to do any final test instance configuration, this
|
63
|
+
# function will be called immediately before the test method is finally rendered. The test method
|
64
|
+
# object itself will be passed in as an argument.
|
65
|
+
finalize: lambda do |tm|
|
66
|
+
tm.my_arg3 = 'arg3_set_from_finalize'
|
67
|
+
end,
|
68
|
+
# Example of a custom method.
|
69
|
+
# In all cases the test method object will be passed in as the first argument.
|
70
|
+
set_my_arg4: lambda do |tm, val|
|
71
|
+
tm.my_arg4 = val
|
72
|
+
end
|
73
|
+
}
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
def add_custom_til
|
78
|
+
add_til :mylib,
|
79
|
+
test_a: {
|
80
|
+
# Basic arg
|
81
|
+
my_arg0: :arg0,
|
82
|
+
# Basic arg with default value
|
83
|
+
my_arg1: [:arg1, 'a_default_value'],
|
84
|
+
# Basic arg with default value and possible values
|
85
|
+
my_arg2: [:arg2, 'volt', %w(volt curr)],
|
86
|
+
my_arg3: :arg3,
|
87
|
+
my_arg4: :arg4,
|
88
|
+
# Attribute aliases can be defined like this:
|
89
|
+
aliases: {
|
90
|
+
my_arg_alias: :my_arg,
|
91
|
+
my_arg1_alias: :my_arg1,
|
92
|
+
my_arg2_alias: :my_arg2
|
93
|
+
},
|
94
|
+
# Define any methods you want the test method to have
|
95
|
+
methods: {
|
96
|
+
# An optional finalize function can be supplied to do any final test instance configuration, this
|
97
|
+
# function will be called immediately before the test instance is finally rendered. The test instance
|
98
|
+
# object itself will be passed in as an argument.
|
99
|
+
finalize: lambda do |ti|
|
100
|
+
ti.my_arg3 = 'arg3_set_from_finalize'
|
101
|
+
end,
|
102
|
+
# Example of a custom method.
|
103
|
+
# In all cases the test method object will be passed in as the first argument.
|
104
|
+
set_my_arg4: lambda do |ti, val|
|
105
|
+
ti.my_arg4 = val
|
106
|
+
end
|
107
|
+
}
|
108
|
+
}
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen_testers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|
@@ -102,9 +102,8 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- config/application.rb
|
105
|
+
- config/boot.rb
|
105
106
|
- config/commands.rb
|
106
|
-
- config/development.rb
|
107
|
-
- config/environment.rb
|
108
107
|
- config/shared_commands.rb
|
109
108
|
- config/users.rb
|
110
109
|
- config/version.rb
|
@@ -129,6 +128,7 @@ files:
|
|
129
128
|
- lib/origen_testers/generator/test_numberer.rb
|
130
129
|
- lib/origen_testers/igxl_based_tester.rb
|
131
130
|
- lib/origen_testers/igxl_based_tester/base.rb
|
131
|
+
- lib/origen_testers/igxl_based_tester/base/custom_test_instance.rb
|
132
132
|
- lib/origen_testers/igxl_based_tester/base/flow.rb
|
133
133
|
- lib/origen_testers/igxl_based_tester/base/flow_line.rb
|
134
134
|
- lib/origen_testers/igxl_based_tester/base/generator.rb
|
@@ -143,8 +143,10 @@ files:
|
|
143
143
|
- lib/origen_testers/igxl_based_tester/base/test_instance.rb
|
144
144
|
- lib/origen_testers/igxl_based_tester/base/test_instance_group.rb
|
145
145
|
- lib/origen_testers/igxl_based_tester/base/test_instances.rb
|
146
|
+
- lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb
|
146
147
|
- lib/origen_testers/igxl_based_tester/files.rb
|
147
148
|
- lib/origen_testers/igxl_based_tester/j750.rb
|
149
|
+
- lib/origen_testers/igxl_based_tester/j750/custom_test_instance.rb
|
148
150
|
- lib/origen_testers/igxl_based_tester/j750/flow.rb
|
149
151
|
- lib/origen_testers/igxl_based_tester/j750/flow_line.rb
|
150
152
|
- lib/origen_testers/igxl_based_tester/j750/generator.rb
|
@@ -165,6 +167,7 @@ files:
|
|
165
167
|
- lib/origen_testers/igxl_based_tester/j750/test_instance_group.rb
|
166
168
|
- lib/origen_testers/igxl_based_tester/j750/test_instances.rb
|
167
169
|
- lib/origen_testers/igxl_based_tester/j750_hpt.rb
|
170
|
+
- lib/origen_testers/igxl_based_tester/j750_hpt/custom_test_instance.rb
|
168
171
|
- lib/origen_testers/igxl_based_tester/j750_hpt/flow.rb
|
169
172
|
- lib/origen_testers/igxl_based_tester/j750_hpt/flow_line.rb
|
170
173
|
- lib/origen_testers/igxl_based_tester/j750_hpt/generator.rb
|
@@ -195,6 +198,7 @@ files:
|
|
195
198
|
- lib/origen_testers/igxl_based_tester/parser/timeset.rb
|
196
199
|
- lib/origen_testers/igxl_based_tester/parser/timesets.rb
|
197
200
|
- lib/origen_testers/igxl_based_tester/ultraflex.rb
|
201
|
+
- lib/origen_testers/igxl_based_tester/ultraflex/custom_test_instance.rb
|
198
202
|
- lib/origen_testers/igxl_based_tester/ultraflex/flow.rb
|
199
203
|
- lib/origen_testers/igxl_based_tester/ultraflex/flow_line.rb
|
200
204
|
- lib/origen_testers/igxl_based_tester/ultraflex/generator.rb
|
@@ -258,6 +262,7 @@ files:
|
|
258
262
|
- lib/origen_testers/smartest_based_tester/v93k/test_suites.rb
|
259
263
|
- lib/origen_testers/test/basic_interface.rb
|
260
264
|
- lib/origen_testers/test/block.rb
|
265
|
+
- lib/origen_testers/test/custom_test_interface.rb
|
261
266
|
- lib/origen_testers/test/dut.rb
|
262
267
|
- lib/origen_testers/test/dut2.rb
|
263
268
|
- lib/origen_testers/test/j750_base_interface.rb
|
@@ -293,6 +298,7 @@ files:
|
|
293
298
|
- program/_iv_resources.rb
|
294
299
|
- program/basic_interface.rb
|
295
300
|
- program/components/_prb2_main.rb
|
301
|
+
- program/custom_tests.rb
|
296
302
|
- program/flow_control.rb
|
297
303
|
- program/prb1.rb
|
298
304
|
- program/prb1_resources.rb
|
data/config/environment.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "origen_testers"
|