1*** Variables ***
2${CPU}                        sysbus.cpu
3${UART}                       sysbus.uart0
4${URI}                        @https://dl.antmicro.com/projects/renode
5${SCRIPT}                     ${CURDIR}/../../../scripts/single-node/sifive_fe310.resc
6
7*** Test Cases ***
8Should Run Shell
9    [Documentation]           Runs Zephyr's 'shell' sample on SiFive Freedom E310 platform.
10    [Tags]                    zephyr  uart  interrupts
11    Execute Command           $bin = ${URI}/zephyr-fe310-shell.elf-s_323068-cf87169150ecdb30ad5a14c87ae209c53dd3eca2
12    Execute Script            ${SCRIPT}
13
14    Create Terminal Tester    ${UART}  endLineOption=TreatCarriageReturnAsEndLine
15    Start Emulation
16
17    Wait For Prompt On Uart   shell>
18    # this sleep here is to prevent against writing to soon on uart - it can happen under high stress of the host CPU - when an uart driver is not initalized which leads to irq-loop
19    Sleep                     3
20    Write Line To Uart        select sample_module
21    Wait For Prompt On Uart   sample_module>
22    Write Line To Uart        ping
23    Wait For Line On Uart     pong
24