diff options
Diffstat (limited to 'test/lib/term')
-rwxr-xr-x | test/lib/term | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lib/term b/test/lib/term index 0093f90..004c2a2 100755 --- a/test/lib/term +++ b/test/lib/term @@ -228,6 +228,20 @@ pane_parse() { printf '%s' "${__buf}" || printf '@EMPTY@' } +# pane_status() - Wait for command to complete and return its exit status +# $1: Pane name +pane_status() { + pane_wait "${1}" + __status="$(pane_parse "${1}")" + while ! [ "${__status}" -eq "${__status}" ]; do + sleep 1 + pane_run "${1}" 'echo $?' + pane_wait "${1}" + __status="$(pane_parse "${1}")" + done + return ${__status} +} + # status_file_end() - Display and log messages when tests from one file are done status_file_end() { [ -z "${STATUS_FILE}" ] && return |