diff options
author | Sachin Gupta <sgupta2m@in.ibm.com> | 2015-08-03 01:35:40 -0500 |
---|---|---|
committer | Amit J. Tendolkar <amit.tendolkar@in.ibm.com> | 2015-09-16 12:51:18 -0500 |
commit | be0d20022a9c367d9897c837b0550eb61eab2da9 (patch) | |
tree | 255ab86e4b108dae8316e7e66ea4cf94a1d9781d /sbe/test | |
parent | 0321d657e2008d8c99ed9f671db4405b161ff616 (diff) | |
download | talos-sbe-be0d20022a9c367d9897c837b0550eb61eab2da9.tar.gz talos-sbe-be0d20022a9c367d9897c837b0550eb61eab2da9.zip |
SBE Get Capabilities support
RTC: 128328
Change-Id: Ic00f99ec7214d6080df4edef30bd6722f2a0fa97
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19488
Tested-by: Jenkins Server
Reviewed-by: Amit J. Tendolkar <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'sbe/test')
-rwxr-xr-x | sbe/test/test.xml | 1 | ||||
-rwxr-xr-x | sbe/test/testGeneric.xml | 7 | ||||
-rwxr-xr-x | sbe/test/testGetCapabilities.py | 59 |
3 files changed, 67 insertions, 0 deletions
diff --git a/sbe/test/test.xml b/sbe/test/test.xml index 1bb0a263..434a6df8 100755 --- a/sbe/test/test.xml +++ b/sbe/test/test.xml @@ -19,6 +19,7 @@ </testcas --> <include>../simics/targets/p9_nimbus/sbeTest/testIstep.xml</include> <include>../simics/targets/p9_nimbus/sbeTest/testScom.xml</include> + <include>../simics/targets/p9_nimbus/sbeTest/testGeneric.xml</include> </test> </platform> </integrationtest> diff --git a/sbe/test/testGeneric.xml b/sbe/test/testGeneric.xml new file mode 100755 index 00000000..5073121c --- /dev/null +++ b/sbe/test/testGeneric.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> + + <!-- SBE Get Capabilities Test case --> + <testcase> + <simcmd>run-python-file targets/p9_nimbus/sbeTest/testGetCapabilities.py</simcmd> + <exitonerror>yes</exitonerror> + </testcase> diff --git a/sbe/test/testGetCapabilities.py b/sbe/test/testGetCapabilities.py new file mode 100755 index 00000000..270a1326 --- /dev/null +++ b/sbe/test/testGetCapabilities.py @@ -0,0 +1,59 @@ +import sys +sys.path.append("targets/p9_nimbus/sbeTest" ) +import testUtil +err = False + +TESTDATA = [0,0,0,2, + 0,0,0xA8,0x02 ] + +EXPDATA1 = [0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0xa1,0x0,0x0,0x01, # istep + 0x0,0x0,0x0,0x0, + 0xa2,0x0,0x0,0x03, #getscom/putscom + 0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x00,0x0,0x0,0x0]; + +EXPDATA2 = [0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0, + 0x00,0x0,0x0,0x0]; + +EXPDATA3 = [0xa8,0x0,0x0,0x02, #getcapability + 0x0,0x0,0x0,0x0, + 0xc0,0xde,0xa8,0x02, + 0x0,0x0,0x0,0x0, + 0x00,0x0,0x0,0x3]; + + +# MAIN Test Run Starts Here... +#------------------------------------------------- +def main( ): + testUtil.runCycles( 10000000 ) + testUtil.writeUsFifo( TESTDATA ) + testUtil.writeEot( ) + # Ignore first two enteries ( major number, minor number + # and fw version) as they will keep on changing + testUtil.readDsEntry( 2 ) + testUtil.readDsFifo( EXPDATA1 ) + testUtil.readDsFifo( EXPDATA2 ) + testUtil.readDsFifo( EXPDATA3 ) + testUtil.readEot( ) + +#------------------------------------------------- +# Calling all test code +#------------------------------------------------- +main() + +if err: + print ("\nTest Suite completed with error(s)") + #sys.exit(1) +else: + print ("\nTest Suite completed with no errors") + #sys.exit(0); + |