xref: /rust-libc-0.2.174/ci/run-docker.sh (revision a097ff6d)
1# Small script to run tests for a target (or all targets) inside all the
2# respective docker images.
3
4set -ex
5
6run() {
7    echo $1
8    docker build -t libc ci/docker/$1
9    docker run \
10      -v `rustc --print sysroot`:/rust:ro \
11      -v `pwd`:/checkout:ro \
12      -e CARGO_TARGET_DIR=/tmp/target \
13      -w /checkout \
14      --privileged \
15      -it libc \
16      ci/run.sh $1
17}
18
19if [ -z "$1" ]; then
20  for d in `ls ci/docker/`; do
21    run $d
22  done
23else
24  run $1
25fi
26