1*** Variables ***
2${UART}                             sysbus.uart
3${PLATFORM}                         @tests/peripherals/CLIC/CLIC-test-platform.repl
4${BIN}                              @https://dl.antmicro.com/projects/renode/clic/clic_preemption-01.elf-s_10168-4a165b59b2d840747b93f7b8c2e61a2d0ef7da0f
5
6*** Keywords ***
7Create Machine
8    Execute Command                 using sysbus
9    Execute Command                 mach create
10    Execute Command                 machine LoadPlatformDescription ${PLATFORM}
11    Execute Command                 sysbus LoadELF ${BIN}
12
13*** Test Cases ***
14Should Pass CLIC-preemption-01
15    Create Machine
16    Create Terminal Tester          ${UART}
17
18    Wait For Line On Uart           Init complete
19    Execute Command                 clic OnGPIO 16 True
20    Wait For Line On Uart           Interrupt 16, level 2
21    Execute Command                 clic OnGPIO 17 True
22    Should Not Be On Uart           Interrupt 17, level 1
23    Execute Command                 clic OnGPIO 18 True
24    Wait For Line On Uart           Interrupt 18, level 3
25