diff options
author | Marty E. Plummer <hanetzer@startmail.com> | 2019-05-10 00:43:56 -0500 |
---|---|---|
committer | RAJA DAS <rajadas2@in.ibm.com> | 2020-01-15 23:42:58 -0600 |
commit | e0e6c72e94c754b76b1cdd4cbc44a15762e04dee (patch) | |
tree | ceec48183120c4b20de16efd4ddcc5488f5ec203 /src/test/testcases/testUtil.py | |
parent | 54f3205f2ce678cf8d377f4d3d5c23b3bce33096 (diff) | |
download | talos-sbe-e0e6c72e94c754b76b1cdd4cbc44a15762e04dee.tar.gz talos-sbe-e0e6c72e94c754b76b1cdd4cbc44a15762e04dee.zip |
treewide: use print function instead of statement
This enables better compat between python2.7 and python3.x
Without this change, building with python3.x (python3.5 tested) as
/usr/bin/python will result in the following error:
File: "sbe/src/build/security/securityRegListGen.py", line 64
-v, --verbose enable verbose traces"
^
SyntaxError: Missing parentheses in call to 'print'
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Change-Id: Id617f54096fca5cc5fcd829767595a85350e343d
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89618
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Diffstat (limited to 'src/test/testcases/testUtil.py')
-rw-r--r-- | src/test/testcases/testUtil.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/testcases/testUtil.py b/src/test/testcases/testUtil.py index 95626fa1..d070081e 100644 --- a/src/test/testcases/testUtil.py +++ b/src/test/testcases/testUtil.py @@ -22,6 +22,7 @@ # permissions and limitations under the License. # # IBM_PROLOG_END_TAG +from __future__ import print_function import time import conf from sim_commands import * @@ -252,14 +253,14 @@ def runCycles( cycles ): syscmd = "run-cycles %d"%(cycles) ( rc, out ) = quiet_run_command( syscmd, output_modes.regular ) if ( rc ): - print "simics ERROR running %s: %d "%( syscmd, rc ) + print("simics ERROR running %s: %d "%( syscmd, rc )) def checkEqual( data, expdata ): """ Throw exception if data is not equal """ if( cmp(data, expdata )): - print "Eqality check failed" - print "Data:", data - print "Expected Data", expdata + print("Eqality check failed") + print("Data:", data) + print("Expected Data", expdata) raise Exception('data mistmach'); def getMachineName(): @@ -277,4 +278,4 @@ def collectFFDC(): simics.SIM_run_command('sbe-regffdc 0') simics.SIM_run_command('backplane0.proc0.pib_cmp.sbe_ppe->ppe_state') simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->upstream_hw_fifo') - simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->downstream_hw_fifo')
\ No newline at end of file + simics.SIM_run_command('backplane0.proc0.cfam_cmp.sbe_fifo->downstream_hw_fifo') |