1*** Variables ***
2${UART}                       sysbus.usart1
3${URL}                        https://dl.antmicro.com/projects/renode
4
5*** Test Cases ***
6Run Mbed-OS Hello World
7    Execute Command           set bin @${URL}/renode-mbed-pipeline-helloworld.elf-ga2ede71-s_2466384-6e3635e4ed159bc847cf1deb3dc7f24b10d26b41
8    Execute Command           include @scripts/single-node/stm32f746_mbed.resc
9
10    Execute Command           showAnalyzer ${UART}
11    Create Terminal Tester    ${UART}
12
13    Start Emulation
14
15    Wait For Line On Uart     HELLO WORLD MBED+RENODE
16
17    Provides                  hello-world
18
19Wait For Message on LTDC
20    [Tags]                    non_critical
21    Requires                  hello-world
22
23    Execute Command           emulation CreateFrameBufferTester "fb_tester" 10
24    Execute Command           fb_tester AttachTo sysbus.ltdc
25    Execute Command           fb_tester WaitForFrame @${URL}/mbed-stm32f7.png-s_4651-99842c172e660e408b2197e48c8e9dccd7948421
26
27Run FreeRTOS CLI
28    Execute Command           set bin @${URL}/stm32f746--cube_mx-freertos_cli.elf-s_1057672-cffcaec0bd9a5b282d701ad1fe8ded67e117a52b
29    Execute Command           include @scripts/single-node/stm32f746.resc
30
31    Execute Command           showAnalyzer ${UART}
32    Create Terminal Tester    ${UART}
33
34    Start Emulation
35
36    Wait For Line On Uart     FreeRTOS command server.
37    Wait For Prompt On Uart   >
38    Write Line To Uart        help
39    Wait For Line On Uart     [Press ENTER to execute the previous command again]
40    Wait For Prompt On Uart   >
41    Write Line To Uart        echo-parameters a b
42    Wait For Line On Uart     The parameters were:
43    Wait For Line On Uart     1: a
44    Wait For Line On Uart     2: b
45
46Should Run Dartino
47    Execute Command           set bin @${URL}/dartino-lines.elf-s_486816-cd8876ab9de60af779f4429dfe16c79bf831b84d
48    Execute Command           include @scripts/single-node/stm32f746.resc
49    Create Terminal Tester    ${UART}
50
51    Start Emulation
52
53    Wait For Line On Uart     Setup dartino
54    Wait For Line On Uart     Reading dartino snapshot
55    Wait For Line On Uart     Run dartino program
56
57Should Run Zephyr Echo Client With Quectel BG96 Modem
58    Execute Command           include @scripts/single-node/stm32f746_modem.resc
59    Create Terminal Tester    ${UART}
60
61    Start Emulation
62
63    Wait For Line On Uart     Network is ready  timeout=15
64
65    FOR  ${i}  IN RANGE  3
66        Wait For Line On Uart     IPv4 TCP: Received and compared \\d+ bytes, all ok  treatAsRegex=true
67    END
68
69Should Fail To Run Zephyr Echo Client With Quectel BG96 Modem With Overridden Command
70    Execute Command           include @scripts/single-node/stm32f746_modem.resc
71    Create Terminal Tester    ${UART}
72
73    Execute Command           usart2.bg96 OverrideResponseForCommand "AT+QIACT=1" "ERROR"
74
75    Wait For Line On Uart     modem_quectel_bg9x: Error activating modem with pdp context
76