fvp-dockerfiles: Add debug version of stdout-flush-wrapper.sh

We still get occasional issues with LAVA failing to read FVP stdout
completely prior to detecting process termination. Have a version with
"set -x" and with longer pause to help debug those.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Idbe38d9d992320318cf69901221bc3a5cc7da805
diff --git a/stdout-flush-wrapper-debug.sh b/stdout-flush-wrapper-debug.sh
new file mode 100755
index 0000000..2588eca
--- /dev/null
+++ b/stdout-flush-wrapper-debug.sh
@@ -0,0 +1,12 @@
+#!/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