about summary refs log tree commit diff
path: root/src/ci/docker/dist-arm-linux
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-01-19 17:18:12 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-01-20 13:49:16 -0800
commit72c3148bb34fe7365d33f78bd732385ab091f3cb (patch)
tree5d71b9723dfe3c6b6e9bfe20737b0d7f59b321b7 /src/ci/docker/dist-arm-linux
parent5e8d7a4b7c2bfa3c278b93c0a81e151357f9b819 (diff)
More test fixes from rollup
Diffstat (limited to 'src/ci/docker/dist-arm-linux')
-rw-r--r--src/ci/docker/dist-arm-linux/Dockerfile18
-rwxr-xr-xsrc/ci/docker/dist-arm-linux/build-toolchains.sh45
2 files changed, 47 insertions, 16 deletions
diff --git a/src/ci/docker/dist-arm-linux/Dockerfile b/src/ci/docker/dist-arm-linux/Dockerfile
index 956969684b4..03ca4c28078 100644
--- a/src/ci/docker/dist-arm-linux/Dockerfile
+++ b/src/ci/docker/dist-arm-linux/Dockerfile
@@ -58,22 +58,8 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
 USER rustbuild
 WORKDIR /tmp
 
-COPY arm-linux-gnueabi.config /tmp/
-RUN mkdir build && \
-      cd build && \
-      cp ../arm-linux-gnueabi.config .config && \
-      ct-ng oldconfig && \
-      ct-ng build && \
-      cd .. && \
-      rm -rf build
-COPY arm-linux-gnueabihf.config /tmp/
-RUN mkdir build && \
-      cd build && \
-      cp ../arm-linux-gnueabihf.config .config && \
-      ct-ng oldconfig && \
-      ct-ng build && \
-      cd .. && \
-      rm -rf build
+COPY arm-linux-gnueabihf.config arm-linux-gnueabi.config build-toolchains.sh /tmp/
+RUN ./build-toolchains.sh
 
 USER root
 
diff --git a/src/ci/docker/dist-arm-linux/build-toolchains.sh b/src/ci/docker/dist-arm-linux/build-toolchains.sh
new file mode 100755
index 00000000000..ed1406bd7cf
--- /dev/null
+++ b/src/ci/docker/dist-arm-linux/build-toolchains.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+# 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.
+
+set -ex
+
+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
+  rm /tmp/build.log
+  trap - ERR
+  kill $PING_LOOP_PID
+  set -x
+}
+
+mkdir build
+cd build
+cp ../arm-linux-gnueabi.config .config
+ct-ng oldconfig
+hide_output ct-ng build
+cd ..
+rm -rf build
+
+mkdir build
+cd build
+cp ../arm-linux-gnueabihf.config .config
+ct-ng oldconfig
+hide_output ct-ng build
+cd ..
+rm -rf build