]> git.proxmox.com Git - cargo.git/blob - vendor/backtrace/ci/run-docker.sh
New upstream version 0.37.0
[cargo.git] / vendor / backtrace / ci / run-docker.sh
1 # Small script to run tests for a target (or all targets) inside all the
2 # respective docker images.
3
4 set -ex
5
6 run() {
7 docker build -t backtrace -f ci/docker/$1/Dockerfile ci
8 mkdir -p target
9 docker run \
10 --user `id -u`:`id -g` \
11 --rm \
12 --init \
13 --volume $(dirname $(dirname `which cargo`)):/cargo \
14 --env CARGO_HOME=/cargo \
15 --volume `rustc --print sysroot`:/rust:ro \
16 --env TARGET=$1 \
17 --volume `pwd`:/checkout:ro \
18 --volume `pwd`/target:/checkout/target \
19 --workdir /checkout \
20 --privileged \
21 backtrace \
22 bash \
23 -c 'PATH=$PATH:/rust/bin exec ci/run.sh'
24 }
25
26 if [ -z "$1" ]; then
27 for d in `ls ci/docker/`; do
28 run $d
29 done
30 else
31 run $1
32 fi