File tree 4 files changed +60
-1
lines changed
docker/x86_64-unknown-linux-gnu
4 files changed +60
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ matrix:
13
13
rust : nightly
14
14
after_success :
15
15
- travis-cargo --only nightly doc-upload
16
- - name : " libc-test"
16
+ - name : " libc-test (osx) "
17
17
rust : nightly
18
18
os : osx
19
19
osx_image : xcode9.4
@@ -25,6 +25,10 @@ matrix:
25
25
- |
26
26
export TARGET=x86_64-apple-darwin
27
27
sh ci/run.sh $TARGET
28
+ - name : " libc-test (linux)"
29
+ rust : nightly
30
+ script : ci/run-docker.sh x86_64-unknown-linux-gnu
31
+
28
32
script :
29
33
- cargo test
30
34
- cargo test --manifest-path testcrate/Cargo.toml
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:18.04
2
+ RUN apt-get update
3
+ RUN apt-get install -y --no-install-recommends \
4
+ gcc libc6-dev ca-certificates git
5
+ ENV PATH=$PATH:/rust/bin
Original file line number Diff line number Diff line change
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
+ echo " Building docker container for TARGET=${1} "
8
+ docker build -t ctest -f ci/docker/$1 /Dockerfile ci/
9
+ mkdir -p target
10
+ target=$1
11
+ echo " Running docker"
12
+ docker run \
13
+ --user ` id -u` :` id -g` \
14
+ --rm \
15
+ --init \
16
+ --volume $HOME /.cargo:/cargo-h \
17
+ --env CARGO_HOME=/cargo-h \
18
+ --volume ` rustc --print sysroot` :/rust:ro \
19
+ --env TARGET=$target \
20
+ --volume ` pwd` :/checkout:ro \
21
+ --volume ` pwd` /target:/checkout/target \
22
+ --workdir /checkout \
23
+ --privileged \
24
+ ctest \
25
+ bash \
26
+ -c ' PATH=/rust/bin:$PATH exec ci/run.sh'
27
+ }
28
+
29
+ if [ -z " $1 " ]; then
30
+ for d in ` ls ci/docker/` ; do
31
+ run $d
32
+ done
33
+ else
34
+ run $1
35
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Builds and runs tests for a particular target passed as an argument to this
4
+ # script.
5
+
6
+ set -ex
7
+
8
+ : ${TARGET?" The TARGET environment variable must be set." }
9
+
10
+ mkdir -p target
11
+ git clone https://github.com/rust-lang/libc target/libc
12
+ mkdir -p target/libc/target/ctest
13
+ sed -i ' s@ctest = "0.2.3"@ctest = { path = "../../.." }@g' target/libc/libc-test/Cargo.toml
14
+
15
+ cargo test --manifest-path target/libc/libc-test/Cargo.toml --target $TARGET
You can’t perform that action at this time.
0 commit comments