summaryrefslogtreecommitdiff
path: root/ci/run-docker.sh
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-06-10 05:03:23 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-06-15 03:33:30 -0700
commit3eb4a48b1b63909a8898aa37b5f610a63d776f4d (patch)
treef19cb2c4ee40427aae9f986435c6d7072b03637e /ci/run-docker.sh
parent70dce055ebcbb7ef21fa045d95c79fe6b8263d9f (diff)
downloadrust-libc-3eb4a48b1b63909a8898aa37b5f610a63d776f4d.tar.gz
Use docker for all CI tests and images
Previously we were somewhat half-Docker, half-Travis, half apt-get, etc. This commit alters the CI infrastructure to use Docker images for each target. This should make it much easier to update the images and tweak various bits and pieces of installed software. Additionally, it's also much clearer now what's needed for each suite of tests! Some images were updated a bit (e.g. musl is now 1.1.14), but other images encountered failures when updating so they're not getting updated just yet.
Diffstat (limited to 'ci/run-docker.sh')
-rw-r--r--ci/run-docker.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/ci/run-docker.sh b/ci/run-docker.sh
new file mode 100644
index 0000000000..5ad90652f0
--- /dev/null
+++ b/ci/run-docker.sh
@@ -0,0 +1,25 @@
+# Small script to run tests for a target (or all targets) inside all the
+# respective docker images.
+
+set -ex
+
+run() {
+ echo $1
+ docker build -t libc ci/docker/$1
+ docker run \
+ -v `rustc --print sysroot`:/rust:ro \
+ -v `pwd`:/checkout:ro \
+ -e CARGO_TARGET_DIR=/tmp/target \
+ -w /checkout \
+ --privileged \
+ -it libc \
+ ci/run.sh $1
+}
+
+if [ -z "$1" ]; then
+ for d in `ls ci/docker/`; do
+ run $d
+ done
+else
+ run $1
+fi