From 6caab4d10b13d1aa578801c986f7b33bf5b8a725 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 27 Mar 2017 18:08:03 +0800 Subject: [PATCH] test: verify that RTIO collisions appear in log --- artiq/test/coredevice/test_rtio.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/artiq/test/coredevice/test_rtio.py b/artiq/test/coredevice/test_rtio.py index b8cae0212..09f80f4eb 100644 --- a/artiq/test/coredevice/test_rtio.py +++ b/artiq/test/coredevice/test_rtio.py @@ -383,14 +383,19 @@ class CoredeviceTest(ExperimentCase): with self.assertRaises(RTIOSequenceError): self.execute(SequenceError) - # TODO: capture core device log - # def test_collision(self): - # with self.assertRaises(RTIOCollision): - # self.execute(Collision) + def test_collision(self): + comm = self.device_mgr.get("core").comm + comm.clear_log() + self.execute(Collision) + log = comm.get_log() + self.assertIn("RTIO collision", log) - # def test_address_collision(self): - # with self.assertRaises(RTIOCollision): - # self.execute(AddressCollision) + def test_address_collision(self): + comm = self.device_mgr.get("core").comm + comm.clear_log() + self.execute(AddressCollision) + log = comm.get_log() + self.assertIn("RTIO collision", log) def test_watchdog(self): # watchdog only works on the device