mirror of https://github.com/m-labs/artiq.git
test/coredevice/portability: keep trace list entirely on host.
This commit is contained in:
parent
a2618f0b5b
commit
cb90bf6ef3
|
@ -118,43 +118,46 @@ class _Exceptions(EnvExperiment):
|
||||||
self.setattr_device("core")
|
self.setattr_device("core")
|
||||||
self.setattr_argument("trace")
|
self.setattr_argument("trace")
|
||||||
|
|
||||||
|
def _trace(self, i):
|
||||||
|
self.trace.append(i)
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run(self):
|
def run(self):
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
self.trace.append(i)
|
self._trace(i)
|
||||||
if i == 4:
|
if i == 4:
|
||||||
try:
|
try:
|
||||||
self.trace.append(10)
|
self._trace(10)
|
||||||
try:
|
try:
|
||||||
self.trace.append(11)
|
self._trace(11)
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.trace.append(12)
|
self._trace(12)
|
||||||
try:
|
try:
|
||||||
self.trace.append(13)
|
self._trace(13)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
except _MyException:
|
except _MyException:
|
||||||
self.trace.append(14)
|
self._trace(14)
|
||||||
|
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
try:
|
try:
|
||||||
self.trace.append(100)
|
self._trace(100)
|
||||||
if i == 1:
|
if i == 1:
|
||||||
raise _MyException()
|
raise _MyException()
|
||||||
elif i == 2:
|
elif i == 2:
|
||||||
raise IndexError()
|
raise IndexError()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
self.trace.append(101)
|
self._trace(101)
|
||||||
raise
|
raise
|
||||||
except:
|
except:
|
||||||
self.trace.append(102)
|
self._trace(102)
|
||||||
else:
|
else:
|
||||||
self.trace.append(103)
|
self._trace(103)
|
||||||
finally:
|
finally:
|
||||||
self.trace.append(104)
|
self._trace(104)
|
||||||
|
|
||||||
|
|
||||||
class _RPCExceptions(EnvExperiment):
|
class _RPCExceptions(EnvExperiment):
|
||||||
|
|
Loading…
Reference in New Issue