tests/periph_cpuid: check if correct number of bytes was printed
This commit is contained in:
parent
a33857bf29
commit
06f26146d0
@ -15,8 +15,8 @@ def testfunc(child):
|
|||||||
child.expect_exact('This test is reading out the CPUID of the platforms CPU')
|
child.expect_exact('This test is reading out the CPUID of the platforms CPU')
|
||||||
child.expect(r'CPUID_LEN: (\d+)')
|
child.expect(r'CPUID_LEN: (\d+)')
|
||||||
cpuid_len = int(child.match.group(1))
|
cpuid_len = int(child.match.group(1))
|
||||||
expected = 'CPUID:' + cpuid_len * r' 0x[0-9a-fA-F]{2}'
|
child.expect(r'CPUID:( 0x[0-9a-fA-F]{2})+\s*$')
|
||||||
child.expect(expected)
|
assert child.match.group(0).count(' 0x') == cpuid_len
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user