#!/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. | |
cmd="$1" | |
shift | |
stdbuf -oL "$cmd" "$@" | |
sleep 10 |