Ignore SIGPIPE when interacting with docker
There is this random failures (~10% of the time) where
this script suddenly exits with a 141 (SIGPIPE) after
its call using a docker inspect. The data needed from
the command is always correctly found so just ignore
the SIGPIPE.
Change-Id: I2364ff551677a99bc1308a43971f9ab87086d31c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/run-qemu-robot-test.sh b/run-qemu-robot-test.sh
index 94f9fc4..0802e14 100755
--- a/run-qemu-robot-test.sh
+++ b/run-qemu-robot-test.sh
@@ -112,6 +112,12 @@
# docker instances talk over their private network
DOCKER_SSH_PORT=22
DOCKER_HTTPS_PORT=443
+
+ # This docker command intermittently asserts a SIGPIPE which
+ # causes the whole script to fail. The IP address comes through
+ # fine on these errors so just ignore the SIGPIPE
+ trap '' PIPE
+
DOCKER_QEMU_IP_ADDR="$(docker inspect $obmc_qemu_docker | \
grep -m 1 "IPAddress\":" | cut -d '"' -f 4)"