diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-11-27 09:40:37 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-12-01 17:16:43 -0800 |
commit | 49d7bca8aa06151f2a2e0dd5b4c37a0f9195201a (patch) | |
tree | 3a669b5ab01cf97418aa2c3723aabfeee9117b00 /ci | |
parent | f25765fbc15745703fa7456323040280dd72a011 (diff) | |
download | rust-libc-49d7bca8aa06151f2a2e0dd5b4c37a0f9195201a.tar.gz |
Add rumprun CI and get tests passing
Diffstat (limited to 'ci')
-rw-r--r-- | ci/rumprun/Dockerfile | 12 | ||||
-rw-r--r-- | ci/run-travis.sh | 49 | ||||
-rw-r--r-- | ci/run.sh | 14 |
3 files changed, 47 insertions, 28 deletions
diff --git a/ci/rumprun/Dockerfile b/ci/rumprun/Dockerfile new file mode 100644 index 0000000000..16c7d375c2 --- /dev/null +++ b/ci/rumprun/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:15.04 + +RUN apt-get update +RUN apt-get install -y binutils git g++ make qemu + +WORKDIR /build +RUN git clone --recursive http://repo.rumpkernel.org/rumprun +WORKDIR /build/rumprun +RUN CC=cc ./build-rr.sh hw + +ENV PATH=$PATH:/build/rumprun/rumprun/bin +WORKDIR /root diff --git a/ci/run-travis.sh b/ci/run-travis.sh index 1e4b144cbe..ec55d86168 100644 --- a/ci/run-travis.sh +++ b/ci/run-travis.sh @@ -16,16 +16,21 @@ if [ "$TARGET" = "" ]; then fi MAIN_TARGETS=https://static.rust-lang.org/dist -EXTRA_TARGETS=https://people.mozilla.org/~acrichton/libc-test/2015-09-08 +DATE=$(echo $TRAVIS_RUST_VERSION | sed s/nightly-//) +EXTRA_TARGETS=https://people.mozilla.org/~acrichton/libc-test/$DATE install() { sudo apt-get update sudo apt-get install -y $@ } +mkdir -p .cargo +cp ci/cargo-config .cargo/config + case "$TARGET" in - *-apple-ios) - curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib + *-apple-ios | *-rumprun-*) + curl -s $EXTRA_TARGETS/$TARGET.tar.gz | \ + tar xzf - -C `rustc --print sysroot`/lib/rustlib ;; *) @@ -44,27 +49,23 @@ case "$TARGET" in esac -case "$TARGET" in - # Pull a pre-built docker image for testing android, then run tests entirely - # within that image. Note that this is using the same rustc installation that - # travis has (sharing it via `-v`) and otherwise the tests run entirely within - # the container. - arm-linux-androideabi) - script=" -cp -r /checkout/* . -mkdir .cargo -cp ci/cargo-config .cargo/config -exec sh ci/run.sh $TARGET -" - exec docker run \ - --entrypoint bash \ - -v $HOME/rust:/usr/local:ro \ - -v `pwd`:/checkout:ro \ - -e LD_LIBRARY_PATH=/usr/local/lib \ - -it alexcrichton/rust-slave-android:2015-10-21 \ - -c "$script" - ;; +# Pull a pre-built docker image for testing android, then run tests entirely +# within that image. Note that this is using the same rustc installation that +# travis has (sharing it via `-v`) and otherwise the tests run entirely within +# the container. +if [ "$DOCKER" != "" ]; then + exec docker run \ + --entrypoint bash \ + -v `rustc --print sysroot`:/usr/local:ro \ + -v `pwd`:/checkout \ + -e LD_LIBRARY_PATH=/usr/local/lib \ + -e CARGO_TARGET_DIR=/tmp \ + -w /checkout \ + -it $DOCKER \ + ci/run.sh $TARGET +fi +case "$TARGET" in x86_64-unknown-linux-musl) install musl-tools export CC=musl-gcc @@ -107,8 +108,6 @@ exec sh ci/run.sh $TARGET esac -mkdir .cargo -cp ci/cargo-config .cargo/config sh ci/run.sh $TARGET if [ "$TARGET" = "x86_64-unknown-linux-gnu" ] && \ @@ -21,9 +21,9 @@ case "$TARGET" in arm-linux-androideabi) emulator @arm-18 -no-window & adb wait-for-device - adb push libc-test/target/$TARGET/debug/libc-test /data/libc-test - adb shell /data/libc-test 2>&1 | tee out - grep "^PASSED .* tests" out + adb push /tmp/$TARGET/debug/libc-test /data/libc-test + adb shell /data/libc-test 2>&1 | tee /tmp/out + grep "^PASSED .* tests" /tmp/out ;; arm-unknown-linux-gnueabihf) @@ -39,6 +39,14 @@ case "$TARGET" in libc-test/target/$TARGET/debug/libc-test ;; + *-rumprun-netbsd) + rumprun-bake hw_virtio /tmp/libc-test.img /tmp/$TARGET/debug/libc-test + qemu-system-x86_64 -nographic -vga none -m 64 \ + -kernel /tmp/libc-test.img 2>&1 | tee /tmp/out & + sleep 5 + grep "^PASSED .* tests" /tmp/out + ;; + *-apple-ios) libc-test/target/$TARGET/debug/libc-test ;; |