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, #pre_initialize, #tester
Methods included from Interface
#add_description!, #add_flow_enable, #add_flow_enable=, #add_meta!, #all_pattern_references, #app_identifier, #atp, #clean_referenced_patterns, #clear_pattern_references, #clear_top_level_flow, #close, #comment, #comments, #compile, #consume_comments, #context_changed?, #context_or_parameter_changed?, #descriptions, #discard_comments, #discard_top_level_flow, #flow_generator, #generating_sub_program?, #identity_map, #import, #merge_pattern_references, #on_program_completion, #parameter_changed?, #pattern_references, #pattern_references_name, #pattern_references_name=, #platform, #record_pattern_reference, #referenced_patterns, #render, #resources_mode, resources_mode?, #resources_mode?, #set_top_level_flow, #test, #top_level_flow, #unique_test_names, #unique_test_names=, with_resources_mode, write=, write?, #write?, #write_files
Methods included from ATP::FlowAPI
#atp, #atp=, #hi_limit, #limit, #lo_limit, #loop
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 |