samples: magic_addr: add pytest check for magic_addr
use pytest script to check result fixes: #82759 Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
This commit is contained in:
parent
d77fb49ac3
commit
19155bdb26
2 changed files with 28 additions and 3 deletions
|
@ -0,0 +1,24 @@
|
|||
# Copyright (c) 2024 NXP
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import logging
|
||||
|
||||
from twister_harness import DeviceAdapter
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def test_magic_addr(dut: DeviceAdapter):
|
||||
'''
|
||||
tag memory twice and check result
|
||||
'''
|
||||
dut.readlines_until(regex='Cast some characters:', print_output=True)
|
||||
dut.write(str.encode('A'))
|
||||
lines = dut.readlines_until(regex='Magic DTCM address accessed', print_output=True)
|
||||
logger.info(lines)
|
||||
dut.write(str.encode('B'))
|
||||
lines = dut.readlines_until(regex='Magic DTCM address accessed', print_output=True)
|
||||
logger.info(lines)
|
||||
ret = any('Magic DTCM address accessed' in line for line in lines)
|
||||
assert ret
|
|
@ -5,8 +5,9 @@ common:
|
|||
integration_platforms:
|
||||
- mimxrt1170_evk/mimxrt1176/cm7
|
||||
- mimxrt1160_evk/mimxrt1166/cm7
|
||||
tags:
|
||||
- pytest
|
||||
tests:
|
||||
sample.boards.mimxrt1170_evk.magic_addr:
|
||||
platform_allow:
|
||||
- mimxrt1170_evk/mimxrt1176/cm7
|
||||
- mimxrt1160_evk/mimxrt1166/cm7
|
||||
filter: CONFIG_MEMC_NXP_FLEXRAM
|
||||
harness: pytest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue