blob: abb6c48a045eb10c0beaed1b83e6e4c6f7e6550a [file] [log] [blame]
Paul Sokolovsky69bdd3b2023-04-04 12:26:30 +03001#!/bin/sh -x
2# This script is to workaround an apparent LAVA race condition, when it
3# detects "EOF" (i.e. app termination) before it reads out all the stdout
4# from the app (FVP in this case). The wrapper explicitly runs a command
5# in line-buffered mode, that helps a little (LAVA reads more output),
6# but not completely, so we just give LAVA more time with some sleep after
7# command termination.
8
Paul Sokolovskydfe531f2023-04-04 15:34:15 +03009delay="$1"
10shift
Paul Sokolovsky69bdd3b2023-04-04 12:26:30 +030011cmd="$1"
12shift
13stdbuf -oL "$cmd" "$@"
Paul Sokolovskydfe531f2023-04-04 15:34:15 +030014sleep $delay