Skip to content
Snippets Groups Projects
Commit 997fcbf0 authored by Kenneth Hiemstra's avatar Kenneth Hiemstra
Browse files

fix for FAILED return status of REMU; added tests for tr_10GbE and

tr_xaui
parent c94849b1
No related branches found
No related tags found
No related merge requests found
...@@ -57,13 +57,45 @@ import pi_wdi ...@@ -57,13 +57,45 @@ import pi_wdi
import pi_epcs import pi_epcs
import pi_remu import pi_remu
import pi_eth import pi_eth
import pi_bsn_monitor
from tools import * from tools import *
from common import * from common import *
from pi_common import *
def test_tr_xaui(tc, io):
tc.set_section_id('Read tr xaui status - ')
tc.append_log(3, '>>>')
tc.append_log(1, '>>> Access the REG_TR_XAUI peripheral (pi_tr_xaui.py)')
tc.append_log(3, '>>>')
tc.append_log(3, '')
from pi_tr_xaui import *
on_execute(class_definition=PiTrXaui,regmap=REGMAP)
def test_tr_10GbE(tc, io):
tc.set_section_id('Read tr 10GbE status - ')
tc.append_log(3, '>>>')
tc.append_log(1, '>>> Access the REG_TR_10GBE peripheral (pi_tr_10GbE.py)')
tc.append_log(3, '>>>')
tc.append_log(3, '')
from pi_tr_10GbE import *
on_execute(class_definition=PiTr10GbE,regmap=REGMAP)
def test_bsn_mon(tc, io):
tc.set_section_id('Read BSN monitor status - ')
tc.append_log(3, '>>>')
tc.append_log(1, '>>> Access the REG_BSN_MONITOR peripheral (pi_bsn_monitor.py)')
tc.append_log(3, '>>>')
Bsn = pi_bsn_monitor.PiBsnMonitor(tc,io)
Bsn.read_bsn_monitor()
tc.append_log(3, '')
def test_info(tc, io): def test_info(tc, io):
tc.set_section_id('Read System Info - ') tc.set_section_id('Read System Info - ')
...@@ -133,12 +165,19 @@ def test_remu(tc,io): ...@@ -133,12 +165,19 @@ def test_remu(tc,io):
tc.append_log(3, '>>>') tc.append_log(3, '>>>')
tc.append_log(1, '>>> REMU (pi_remu.py)') tc.append_log(1, '>>> REMU (pi_remu.py)')
tc.append_log(3, '>>>') tc.append_log(3, '>>>')
dummy_tc = test_case.Testcase('Dummy TB - ', '')
dummy_tc.set_result('PASSED')
Remu = pi_remu.PiRemu(tc, io) Remu = pi_remu.PiRemu(dummy_tc, io)
try: try:
Remu.write_user_reconfigure() Remu.write_user_reconfigure()
except: except:
pass # ignoring FAILED pass # ignoring FAILED
if dummy_tc.get_result() == 'FAILED':
tc.append_log(1, 'Result=%s but ignoring this' % dummy_tc.get_result())
tc.append_log(3, '') tc.append_log(3, '')
...@@ -176,6 +215,7 @@ def test_flash(tc,io): ...@@ -176,6 +215,7 @@ def test_flash(tc,io):
def sleep(tc,io): def sleep(tc,io):
tc.set_section_id('SLEEP - ')
tc.append_log(3, 'sleeping 1 second') tc.append_log(3, 'sleeping 1 second')
tc.sleep(1.0) tc.sleep(1.0)
...@@ -194,17 +234,25 @@ Cmd = { ...@@ -194,17 +234,25 @@ Cmd = {
5 : ('FLASH' , test_flash, 'using pi_epcs to program/verify flash'), 5 : ('FLASH' , test_flash, 'using pi_epcs to program/verify flash'),
6 : ('REMU' , test_remu, 'using pi_remu to load user image'), 6 : ('REMU' , test_remu, 'using pi_remu to load user image'),
7 : ('ETH' , test_eth, 'using pi_eth to read eth status'), 7 : ('ETH' , test_eth, 'using pi_eth to read eth status'),
8 : ('XAUI' , test_tr_xaui, 'using pi_tr_xaui to read xaui status'),
9 : ('10GBE' , test_tr_10GbE,'using pi_tr_10GbE to read 10GbE status'),
10 : ('BSN' , test_bsn_mon, 'using pi_bsn_monitor to read BSN monitor'),
100 : ('HELP' , show_help, 'show help on commands') 100 : ('HELP' , show_help, 'show help on commands')
} }
def help_text(tc,io): def help_text(tc,io):
tc.append_log(0, '>>> Usage [--cmd <command number or series of numbers>]:') tc.append_log(0, '>>> Usage [--cmd <command number or series of numbers>]:')
for cmd in sorted(Cmd): for cmd in sorted(Cmd):
tc.append_log(0, ' . %d : %s: %s' % (cmd,Cmd[cmd][0],Cmd[cmd][2])) tc.append_log(0, ' . %d : %s: %s' % (cmd,Cmd[cmd][0],Cmd[cmd][2]))
tc.append_log(0, '') tc.append_log(0, '')
tc.append_log(0, '[full test] sequence: --cmd 1,4,0,0,0,0,1,5,6,0,0,0,1,2,3 -s file.rbf') tc.append_log(0, '[full test] sequence: --cmd 1,4,0,0,0,0,1,0,5,6,0,0,0,0,1,2,3 -s file.rbf')
tc.append_log(0, '[image start and test] sequence: --cmd 1,4,0,0,0,0,1,6,0,0,0,1,2,3') tc.append_log(0, '[image start and test] sequence: --cmd 1,4,0,0,0,0,1,6,0,0,0,0,1,2,3')
tc.append_log(0, '[read info,sensors] sequence: --cmd 1,2,3 --rep 10') tc.append_log(0, '[re-read info,sensors] sequence: --cmd 1,2,3 --rep 10')
tc.append_log(0, '[reset to factory] sequence: --cmd 1,4,0,0,0,0,1')
tc.append_log(0, '[program user image] sequence: --cmd 5 -s file.rbf')
tc.append_log(0, '[load user image] sequence: --cmd 6,0,0,0,0,1')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment