refactor(expect): wait for SIGINT or EOF when holding UARTs
This change allows any Expect scripts that include the `uart-hold.inc`
to terminate with success upon reception of either EOF or the SIGINT
(Ctrl+C) signal. The former is necessary for the OpenCI, and the latter
for the on-premises CI.
This change also introduces the `terminable.inc` Expect script fragment,
which adds a trap handler for the SIGINT signal (Ctrl+C) which will exit
the Expect script with success. This is useful for scripts that work
around SDDKW-43675, where the model hangs if UARTs which generate a lot
of output are not flushed frequently.
The `handle-arguments.inc` fragment has been updated to ignore SIGINT so
that other terms are not terminated prematurely.
See: https://jira.arm.com/browse/SDDKW-43675
Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: Icb106b60409c4e3be2b025fa1d4550af3acb57be
5 files changed