Skip to content

Commit 4767b98

Browse files
committed
tests/core/msg_queue_print: accept (nil) instead of 0x0+ for all boards
1 parent ede39c6 commit 4767b98

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/core/msg_queue_print/tests/01-run.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ def expect_some(child, size, avail, range_start):
4141

4242
def expect_content(child, counter):
4343
if counter == 0:
44-
if os.environ.get('BOARD') in ['native', 'native32', 'native64']:
45-
child.expect_exact('type: 0x0000, content: 0 ((nil))')
46-
else:
47-
child.expect(r'type: 0x0000, content: 0 \((0x)?0+\)')
44+
child.expect(r'type: 0x0000, content: 0 \(\(nil\)|(0x)?0+\)')
4845
else:
49-
child.expect(f'type: 0x{counter:04x}, content: {counter} \((0x)?0*{counter:x}\)')
46+
child.expect(r'type: (0x[a-fA-F0-9]+), content: (\d+) \(((0x)?[a-fA-Z0-9]+)\)')
47+
assert int(child.match.group(1), 16) == counter, f"Expected {counter:x} as type, got child.match.group(1)"
48+
assert int(child.match.group(2)) == counter, f"Expected {counter} as content, got child.match.group(2)"
49+
assert int(child.match.group(3), 16) == counter, f"Expected {counter:x} as ptr, got child.match.group(3)"
5050

5151

5252
def testfunc(child):

0 commit comments

Comments
 (0)