summary refs log tree commit diff
path: root/src/ci/docker/dist-powerpc64-linux/shared.sh
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-03-17 07:04:18 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-03-17 07:12:56 -0700
commitbbfdb56910ffe84bfff7fbf0472cbb4647ee5d45 (patch)
treecebfc1208eecd692453a0bbff7994b417b883fb9 /src/ci/docker/dist-powerpc64-linux/shared.sh
parentec829fe00e3af57aa083b83f282ad05c2cc9acc7 (diff)
downloadrust-bbfdb56910ffe84bfff7fbf0472cbb4647ee5d45.tar.gz
rust-bbfdb56910ffe84bfff7fbf0472cbb4647ee5d45.zip
travis: Use `hide_output` in dist-powerpc64-linux
Looks like we blew the 4MB cap, so let's hide some more output.
Diffstat (limited to 'src/ci/docker/dist-powerpc64-linux/shared.sh')
-rw-r--r--src/ci/docker/dist-powerpc64-linux/shared.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ci/docker/dist-powerpc64-linux/shared.sh b/src/ci/docker/dist-powerpc64-linux/shared.sh
new file mode 100644
index 00000000000..97e6d2908cf
--- /dev/null
+++ b/src/ci/docker/dist-powerpc64-linux/shared.sh
@@ -0,0 +1,25 @@
+# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+hide_output() {
+  set +x
+  on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+  trap "$on_err" ERR
+  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+  PING_LOOP_PID=$!
+  $@ &> /tmp/build.log
+  trap - ERR
+  kill $PING_LOOP_PID
+  set -x
+}