| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 1 | # Initial script which is run inside of all qemu images. The first argument to |
| 2 | # this script (as arranged by the qemu image itself) is the path to where the |
| 3 | # libc crate is mounted. |
| 4 | # |
| 5 | # For qemu images we currently need to install Rust manually as this wasn't done |
| 6 | # by the initial run-travis.sh script |
| 7 | # |
| 8 | # FIXME: feels like run-travis.sh should be responsible for downloading the |
| 9 | # compiler. |
| 10 | |
| 11 | set -ex |
| 12 | |
| 13 | ROOT=$1 |
| 14 | cp -r $ROOT/libc /tmp/libc |
| 15 | cd /tmp/libc |
| 16 | |
| 17 | TARGET=$(cat $ROOT/TARGET) |
| Alex Crichton | 3eb4a48 | 2016-06-10 05:03:23 -0700 | [diff] [blame] | 18 | export CARGO_TARGET_DIR=/tmp |
| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 19 | |
| 20 | case $TARGET in |
| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 21 | *-openbsd) |
| 22 | pkg_add rust curl gcc-4.8.4p4 |
| 23 | curl https://static.rust-lang.org/cargo-dist/2015-04-02/cargo-nightly-x86_64-unknown-openbsd.tar.gz | \ |
| 24 | tar xzf - -C /tmp |
| 25 | export PATH=$PATH:/tmp/cargo-nightly-x86_64-unknown-openbsd/cargo/bin |
| 26 | export CC=egcc |
| 27 | ;; |
| 28 | |
| 29 | *) |
| 30 | echo "Unknown target: $TARGET" |
| 31 | exit 1 |
| 32 | ;; |
| 33 | esac |
| 34 | |
| 35 | exec sh ci/run.sh $TARGET |