Module: OrigenTesters::BasicTestSetups
- Includes:
- ProgramGenerators
- Included in:
- Test::BasicInterface
- Defined in:
- lib/origen_testers/basic_test_setups.rb
Overview
Including this module in a class will create a basic test program interface that can generate programs for all ATE platforms supported by the Testers plugin.
It provides a number of methods that can be called from a test program flow file to do basic things like a functional test.
Constant Summary
Constants included from ProgramGenerators
Instance Method Summary collapse
-
#extract_pattern(name, options = {}) ⇒ Object
Extract the pattern name from the given options, falling back to the given test name if a :pattern option is not present.
-
#functional(name, options = {}) ⇒ Hash
Execute a functional test.
Methods included from ProgramGenerators
#_load_generator, #initialize, #tester
Instance Method Details
#extract_pattern(name, options = {}) ⇒ Object
Extract the pattern name from the given options, falling back to the given test name if a :pattern option is not present.
It will also strip any extension if one is present.
99 100 101 102 103 |
# File 'lib/origen_testers/basic_test_setups.rb', line 99 def extract_pattern(name, = {}) p = [:pattern] || name p = p.to_s.sub(/\..*$/, '') p end |
#functional(name, options = {}) ⇒ Hash
Execute a functional test
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/origen_testers/basic_test_setups.rb', line 70 def functional(name, = {}) = { pin_levels: 'Lvl', time_set: 'Tim' }.merge() pattern = extract_pattern(name, ) if tester.j750? || tester.j750_hpt? || tester.ultraflex? ins = test_instances.functional(name, ) pname = "#{pattern}_pset" pset = patsets.add(pname, [{ pattern: "#{pattern}.PAT" }]) ins.pattern = pname line = flow.test(ins, ) { test_instance: ins, flow_line: line, patset: pset } elsif tester.v93k? tm = test_methods.ac_tml.ac_test.functional_test ts = test_suites.run(name, ) ts.test_method = tm ts.pattern = pattern node = flow.test(ts, ) { test_method: tm, test_suite: ts, node: node } else fail "Unsupported tester: #{tester.class}" end end |