summaryrefslogtreecommitdiffstats
path: root/sbe/test
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2016-04-04 03:18:13 -0500
committerAMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>2016-04-05 07:16:32 -0400
commite453a6782e4d56a37342fcd0c5e4b303bb5bacba (patch)
tree45954d1845aa389f4053bf58888e2f05beb0d789 /sbe/test
parent7b92c5d8d82c9e82e3fbd1ac35a319dbaa340858 (diff)
downloadtalos-sbe-e453a6782e4d56a37342fcd0c5e4b303bb5bacba.tar.gz
talos-sbe-e453a6782e4d56a37342fcd0c5e4b303bb5bacba.zip
Enable auto register for SBE tools
Change-Id: I79788ba40a2cb46855ba7a6c90359ed0616fda23 RTC: 149038 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22822 Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Tested-by: Jenkins Server Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'sbe/test')
-rwxr-xr-xsbe/test/simics-debug-framework.py60
-rwxr-xr-xsbe/test/test.xml7
-rwxr-xr-xsbe/test/testIstepAuto.py6
3 files changed, 3 insertions, 70 deletions
diff --git a/sbe/test/simics-debug-framework.py b/sbe/test/simics-debug-framework.py
deleted file mode 100755
index a96e891f..00000000
--- a/sbe/test/simics-debug-framework.py
+++ /dev/null
@@ -1,60 +0,0 @@
-import os
-import subprocess
-import re
-import random
-import sys
-sys.path.append("targets/p9_nimbus/sbeTest" )
-import testIstepAuto
-err = False
-
-syms = {};
-
-
-# @fn register_hb_debug_framework_tools
-# @brief Create a simics command wrapper for each debug tool module.
-def register_sbe_debug_framework_tools():
- fillSymTable()
- # Create command hook.
- new_command("sbe-istep", testIstepAuto.sbe_istep_func,
- args = [arg(int_t, "major"), arg(int_t, "minor")],
- alias = "istep",
- type = ["sbe-commands"],
- short = "Runs the debug framework for istep ",
- doc = "")
- new_command("sbe-trace", collectTrace,
- args = [],
- alias = "strace",
- type = ["sbe-commands"],
- short = "Runs the debug framework for istep ",
- doc = "")
- print "SBE Debug Framework: Registered tool:", "sbe-istep"
- print "SBE Debug Framework: Registered tool:", "sbe-trace"
-
-
-def fillSymTable():
- symFile = os.environ['SBE_IMG_OUT_LOC'] + "/sbe.syms"
- f = open( symFile, 'r')
- for line in f:
- words = line.split()
- if( len(words) == 3):
- syms[words[2]] = words[0]
-
-def collectTrace():
- cmd1 = "pipe \"p9Proc0.sbe.mibo_space.x 0x" + syms['g_pk_trace_buf'] + " 0x2028\" \"sed 's/^p:0x........ //g' | sed 's/ ................$//g' | sed 's/ //g' | xxd -r -p> ppetrace.bin\""
- toolPath = os.environ['SBE_IMG_OUT_LOC'] + "/../../tools/ppetracepp/"
- cmd2 = "shell \"" + toolPath + "ppe2fsp ppetrace.bin sbetrace.bin \""
- cmd3 = "shell \"" + toolPath + "fsp-trace -s " + os.environ['SBE_IMG_OUT_LOC'] + "/trexStringFile sbetrace.bin > tracMERG \""
- cmd4 = "shell \"" + "cat tracMERG \""
-
- ( rc, out ) = quiet_run_command( cmd1, output_modes.regular )
- if ( rc ):
- print "simics ERROR running %s: %d "%( cmd1, rc )
-
- SIM_run_alone( run_command, cmd2 )
- SIM_run_alone( run_command, cmd3 )
- SIM_run_alone( run_command, cmd4 )
-
-
-# Run the registration automatically whenever this script is loaded.
-register_sbe_debug_framework_tools()
-
diff --git a/sbe/test/test.xml b/sbe/test/test.xml
index 9cbebade..e6a32ba9 100755
--- a/sbe/test/test.xml
+++ b/sbe/test/test.xml
@@ -5,16 +5,11 @@
<machine>%%machine%%</machine>
<test>
- <!-- Set IVPR to point to sbe start address ( currently PIBMEM) -->
+ <!-- Set IVPR to point to sbe start address -->
<testcase>
<simcmd>p9Proc0.proc_chip.invoke parallel_store FSIMBOX 0x01 \"80000000\" 32</simcmd>
<exitonerror>yes</exitonerror>
</testcase>
- <!-- Register SBE tools -->
- <testcase>
- <simcmd>run-python-file targets/p9_nimbus/sbeTest/simics-debug-framework.py</simcmd>
- <exitonerror>yes</exitonerror>
- </testcase>
<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>
diff --git a/sbe/test/testIstepAuto.py b/sbe/test/testIstepAuto.py
index a13c532d..6bff0f99 100755
--- a/sbe/test/testIstepAuto.py
+++ b/sbe/test/testIstepAuto.py
@@ -1,13 +1,11 @@
import sys
-sys.path.append("targets/p9_nimbus/sbeTest" )
-import testUtil
from sim_commands import *
+import imp
err = False
-
+testUtil = imp.load_source("testUtil", os.environ['SBE_TOOLS_PATH'] + "/testUtil.py")
EXPDATA = [0xc0,0xde,0xa1,0x01,
0x0,0x0,0x0,0x0,
0x00,0x0,0x0,0x03];
-
# MAIN Test Run Starts Here...
#-------------------------------------------------
def sbe_istep_func( major, minor ):
OpenPOWER on IntegriCloud