Giacomo Travaglini has submitted this change and it was merged. (
https://gem5-review.googlesource.com/9141 )
Change subject: tests: Add missing print replacements in tests subdir
......................................................................
tests: Add missing print replacements in tests subdir
Some python files were still using deprecated print statement.
Change-Id: I19b1fe9c28650707f01725d40c87ad0538f9c5e6
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Nikos Nikoleris <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/9141
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M tests/configs/gpu-ruby.py
M tests/testing/results.py
2 files changed, 11 insertions(+), 7 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
diff --git a/tests/configs/gpu-ruby.py b/tests/configs/gpu-ruby.py
index 6b20c31..e846dba 100644
--- a/tests/configs/gpu-ruby.py
+++ b/tests/configs/gpu-ruby.py
@@ -33,6 +33,8 @@
# Author: Brad Beckmann
#
+from __future__ import print_function
+
import m5
from m5.objects import *
from m5.defines import buildEnv
@@ -77,7 +79,7 @@
# simulate until program terminates
exit_event = m5.simulate(maxtick)
- print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()
+ print('Exiting @ tick', m5.curTick(), 'because', exit_event.getCause())
parser = optparse.OptionParser()
Options.addCommonOptions(parser)
diff --git a/tests/testing/results.py b/tests/testing/results.py
index 387362a..4e07078 100644
--- a/tests/testing/results.py
+++ b/tests/testing/results.py
@@ -37,6 +37,8 @@
#
# Authors: Andreas Sandberg
+from __future__ import print_function
+
from abc import ABCMeta, abstractmethod
import inspect
import pickle
@@ -173,21 +175,21 @@
def dump_suites(self, suites):
fout = self.fout
for suite in suites:
- print >> fout, "--- %s ---" % suite.name
+ print("--- %s ---" % suite.name, file=fout)
for t in suite.results:
- print >> fout, "*** %s" % t
+ print("*** %s" % t, file=fout)
if t and not self.verbose:
continue
if t.message:
- print >> fout, t.message
+ print(t.message, file=fout)
if t.stderr:
- print >> fout, t.stderr
+ print(t.stderr, file=fout)
if t.stdout:
- print >> fout, t.stdout
+ print(t.stdout, file=fout)
class TextSummary(ResultFormatter):
"""Output test results as a text summary"""
@@ -209,7 +211,7 @@
fout = self.fout
for suite in suites:
status = self.test_status(suite)
- print >> fout, "%s: %s" % (suite.name, status)
+ print("%s: %s" % (suite.name, status), file=fout)
class JUnit(ResultFormatter):
"""Output test results as JUnit XML"""
--
To view, visit https://gem5-review.googlesource.com/9141
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I19b1fe9c28650707f01725d40c87ad0538f9c5e6
Gerrit-Change-Number: 9141
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev