mirror of
https://github.com/m-labs/artiq.git
synced 2025-02-14 19:43:20 +08:00
tests: Adjust regex to match Kasli-SoC exceptions as well
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
d4bd4e5879
commit
9558dd20e1
@ -62,6 +62,16 @@ class KernelRTIOUnderflow(EnvExperiment):
|
||||
at_mu(self.core.get_rtio_counter_mu() - 1000); self.led.on()
|
||||
|
||||
|
||||
RTIO_UNDERFLOW_PATTERN = re.compile(
|
||||
r'''(?xs)RTIOUnderflow\(\d+\):\ RTIO\ underflow\ at\ (?=
|
||||
(?=.*\d+\s*mu\b)
|
||||
(?=.*channel\s+0x[0-9A-Fa-f]+:led\d*)
|
||||
(?=.*slack\s+-\d+\s*mu)
|
||||
).+$
|
||||
''',
|
||||
)
|
||||
|
||||
|
||||
class ExceptionFormatTest(ExperimentCase):
|
||||
def test_custom_formatted_kernel_exception(self):
|
||||
with self.assertLogs() as captured:
|
||||
@ -83,10 +93,7 @@ class ExceptionFormatTest(ExperimentCase):
|
||||
["ERROR:artiq.coredevice.comm_kernel:Couldn't format exception message", "KeyError: 'foo'"])
|
||||
|
||||
def test_rtio_underflow(self):
|
||||
with self.assertRaisesRegex(RTIOUnderflow,
|
||||
re.compile(
|
||||
r"RTIO underflow at channel 0x[0-9a-fA-F]*?:led\d*?, \d+? mu, slack -\d+? mu.*?RTIOUnderflow\(\d+\): RTIO underflow at channel 0x([0-9a-fA-F]+?):led\d*?, \d+? mu, slack -\d+? mu",
|
||||
re.DOTALL)):
|
||||
with self.assertRaisesRegex(RTIOUnderflow, RTIO_UNDERFLOW_PATTERN):
|
||||
self.execute(KernelRTIOUnderflow)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user