| #!/bin/sh -x |
| # This script is to workaround an apparent LAVA race condition, when it |
| # detects "EOF" (i.e. app termination) before it reads out all the stdout |
| # from the app (FVP in this case). The wrapper explicitly runs a command |
| # in line-buffered mode, that helps a little (LAVA reads more output), |
| # but not completely, so we just give LAVA more time with some sleep after |
| # command termination. |
| |
| if [ "$1" = "--version" ]; then |
| echo "$0 1.0" |
| exit |
| fi |
| |
| delay="$1" |
| shift |
| cmd="$1" |
| shift |
| stdbuf -oL "$cmd" "$@" |
| sleep $delay |