This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
13# Small script to run tests for a target (or all targets) inside all the
24# respective docker images.
35
4- set -ex
6+ set -euxo pipefail
57
68run () {
79 local target=$1
810
9- echo $target
11+ echo " testing target: $target "
1012
1113 # This directory needs to exist before calling docker, otherwise docker will create it but it
1214 # will be owned by root
1315 mkdir -p target
1416
15- docker build -t $target ci/docker/$target
17+ docker build -t " $target " " ci/docker/$target "
1618 docker run \
1719 --rm \
18- --user $( id -u) :$( id -g) \
20+ --user " $( id -u) :$( id -g) " \
1921 -e RUSTFLAGS \
2022 -e CARGO_HOME=/cargo \
2123 -e CARGO_TARGET_DIR=/target \
22- -v " ${HOME} /.cargo" :/cargo \
23- -v ` pwd` /target:/target \
24- -v ` pwd` :/checkout:ro \
25- -v ` rustc --print sysroot` :/rust:ro \
24+ -v " ${HOME} /.cargo:/cargo" \
25+ -v " $( pwd) /target:/target" \
26+ -v " $( pwd) :/checkout:ro" \
27+ -v " $( rustc --print sysroot) :/rust:ro" \
2628 --init \
2729 -w /checkout \
28- $target \
30+ " $target " \
2931 sh -c " HOME=/tmp PATH=\$ PATH:/rust/bin exec ci/run.sh $target "
3032}
3133
3234if [ -z " $1 " ]; then
33- for d in ` ls ci/docker/` ; do
35+ echo " running tests for all targets"
36+
37+ for d in ci/docker/* ; do
3438 run $d
3539 done
3640else
Original file line number Diff line number Diff line change 1- #! /usr/ bin/env sh
1+ #! /bin/sh
22
3- set -ex
4- TARGET=$1
3+ set -eux
54
6- cmd=" cargo test --all --target $TARGET "
5+ target=" $1 "
6+
7+ cmd=" cargo test --all --target $target "
78
89# Needed for no-panic to correct detect a lack of panics
910export RUSTFLAGS=" $RUSTFLAGS -Ccodegen-units=1"
You can’t perform that action at this time.
0 commit comments