# Author: Brad Beckmann
#
+from __future__ import print_function
+
import m5
from m5.objects import *
from m5.defines import buildEnv
# 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)
#
# Authors: Andreas Sandberg
+from __future__ import print_function
+
from abc import ABCMeta, abstractmethod
import inspect
import pickle
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"""
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"""