From 06f26146d0782ae5dc1546439d2672f1ac5db72d Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Tue, 12 Nov 2019 10:47:47 +0100 Subject: [PATCH] tests/periph_cpuid: check if correct number of bytes was printed --- tests/periph_cpuid/tests/01-run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/periph_cpuid/tests/01-run.py b/tests/periph_cpuid/tests/01-run.py index becd6c775f..fd3dbcc57a 100755 --- a/tests/periph_cpuid/tests/01-run.py +++ b/tests/periph_cpuid/tests/01-run.py @@ -15,8 +15,8 @@ def testfunc(child): child.expect_exact('This test is reading out the CPUID of the platforms CPU') child.expect(r'CPUID_LEN: (\d+)') cpuid_len = int(child.match.group(1)) - expected = 'CPUID:' + cpuid_len * r' 0x[0-9a-fA-F]{2}' - child.expect(expected) + child.expect(r'CPUID:( 0x[0-9a-fA-F]{2})+\s*$') + assert child.match.group(0).count(' 0x') == cpuid_len if __name__ == "__main__":