From cb90bf6ef3980b5369290627797d38cc97a5efc4 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 31 Dec 2015 22:08:15 +0800 Subject: [PATCH] test/coredevice/portability: keep trace list entirely on host. --- artiq/test/coredevice/portability.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/artiq/test/coredevice/portability.py b/artiq/test/coredevice/portability.py index 0c78cc7a2..546ef3d84 100644 --- a/artiq/test/coredevice/portability.py +++ b/artiq/test/coredevice/portability.py @@ -118,43 +118,46 @@ class _Exceptions(EnvExperiment): self.setattr_device("core") self.setattr_argument("trace") + def _trace(self, i): + self.trace.append(i) + @kernel def run(self): for i in range(10): - self.trace.append(i) + self._trace(i) if i == 4: try: - self.trace.append(10) + self._trace(10) try: - self.trace.append(11) + self._trace(11) break except: pass else: - self.trace.append(12) + self._trace(12) try: - self.trace.append(13) + self._trace(13) except: pass except _MyException: - self.trace.append(14) + self._trace(14) for i in range(4): try: - self.trace.append(100) + self._trace(100) if i == 1: raise _MyException() elif i == 2: raise IndexError() except IndexError: - self.trace.append(101) + self._trace(101) raise except: - self.trace.append(102) + self._trace(102) else: - self.trace.append(103) + self._trace(103) finally: - self.trace.append(104) + self._trace(104) class _RPCExceptions(EnvExperiment):