mirror of
https://github.com/rzzzwilson/pymlac.git
synced 2025-06-10 09:32:41 +00:00
Better handling of trace file
This commit is contained in:
parent
e85e1d8dbf
commit
10bb9b1fe0
@ -66,6 +66,7 @@ import os
|
||||
from Globals import *
|
||||
import MainCPU
|
||||
import Memory
|
||||
import Trace
|
||||
|
||||
import log
|
||||
log = log.Log('test_CPU.log', log.Log.DEBUG)
|
||||
@ -306,7 +307,7 @@ class TestCPU(object):
|
||||
else:
|
||||
log.debug('Operation: %s' % op)
|
||||
|
||||
def execute(self, test):
|
||||
def execute(self, test, filename):
|
||||
"""Execute test string in 'test'."""
|
||||
|
||||
# set globals
|
||||
@ -318,11 +319,12 @@ class TestCPU(object):
|
||||
result = []
|
||||
|
||||
self.memory = Memory.Memory()
|
||||
#self.cpu = MainCPU.MainCPU(memory, display, displaycpu, kbd, ttyin, ttyout, ptp, ptr)
|
||||
self.cpu = MainCPU.MainCPU(self.memory, None, None, None, None, None, None, None)
|
||||
self.cpu.running = True
|
||||
self.display_state = False
|
||||
|
||||
Trace.init(filename+'.trace', self.cpu, None)
|
||||
|
||||
# clear memory and registers to 0 first
|
||||
self.allmem(0)
|
||||
self.allreg(0)
|
||||
@ -450,7 +452,7 @@ class TestCPU(object):
|
||||
# now do each test
|
||||
for test in tests:
|
||||
log.debug('Executing test: %s' % test)
|
||||
self.execute(test)
|
||||
self.execute(test, filename)
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user