Class: OrigenTesters::ATP::Formatters::Basic

Inherits:
OrigenTesters::ATP::Formatter show all
Defined in:
lib/origen_testers/atp/formatters/basic.rb

Overview

Returns the executed flow as a string of test names. This is mainly intended to be used for testing the runner.

Instance Method Summary collapse

Methods inherited from OrigenTesters::ATP::Formatter

format, run, #run_and_format, run_and_format

Methods inherited from Processor

#add_global_flag, #clean_flag, #extract_globals, #extract_volatiles, #global_flag?, #global_flags, #handler_missing, #process, #process_all, #run, #volatile?, #volatile_flags

Instance Method Details

#format(node, options = {}) ⇒ Object



6
7
8
9
10
# File 'lib/origen_testers/atp/formatters/basic.rb', line 6

def format(node, options = {})
  @output = ''
  process(node)
  @output
end

#on_set_result(node) ⇒ Object



24
25
26
27
28
29
# File 'lib/origen_testers/atp/formatters/basic.rb', line 24

def on_set_result(node)
  @output += node.to_a[0].upcase
  @output += " #{node.find(:bin).value}" if node.find(:bin)
  @output += " #{node.find(:softbin).value}" if node.find(:softbin)
  @output += "\n"
end

#on_test(node) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/origen_testers/atp/formatters/basic.rb', line 12

def on_test(node)
  if node.find(:name)
    @output += node.find(:name).value
  else
    obj = node.find(:object).value
    obj = obj['Test'] unless obj.is_a?(String)
    @output += obj
  end
  @output += ' F' if node.find(:failed)
  @output += "\n"
end