Skip to content

Commit

Permalink
WIP: fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 10, 2018
1 parent 4d767e1 commit c5fc4d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ cache:
os:
- linux
- osx
dist: xenial

before_script:
# install extra stuff for cross-compilation
- if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt install gcc-multilib; fi
# macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165)
- if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi
# Compute the rust version we use. We do not use "language: rust" to have more control here.
- |
if [ "$TRAVIS_EVENT_TYPE" = cron ]; then
if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
RUST_TOOLCHAIN=nightly
else
RUST_TOOLCHAIN=$(cat rust-version)
Expand All @@ -38,10 +41,13 @@ script:
cargo build --release --all-features --all-targets &&
cargo install --all-features --force --path .
- |
# Get ourselves a MIR-full libstd
# Get ourselves a MIR-full libstd for the host and a foreign architecture
cargo miri setup &&
cargo miri setup --target i686-unknown-linux-gnu &&
cargo miri setup --target i686-apple-darwin
if [[ "$TRAVIS_OS_NAME" == osx ]]; then
cargo miri setup --target i686-apple-darwin
else
cargo miri setup --target i686-unknown-linux-gnu
fi
- |
# Test miri with full MIR, on the host and other architectures
MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features &&
Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ build: false
test_script:
- set RUSTFLAGS=-g
- set RUST_BACKTRACE=1
# Test plain miri
# Build miri
- cargo build --release --all-features --all-targets
- cargo test --release --all-features
# Get ourselves a MIR-full libstd, and use it henceforth
- cargo run --release --all-features --bin cargo-miri -- miri setup
- set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\miri\cache\HOST
Expand Down
2 changes: 1 addition & 1 deletion src/fn_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
self.write_null(dest)?;
}

"mmap" => {
"mmap" | "mmap$UNIX2003" => {
// This is a horrible hack, but well... the guard page mechanism calls mmap and expects a particular return value, so we give it that value
let addr = self.read_scalar(args[0])?.not_undef()?;
self.write_scalar(addr, dest)?;
Expand Down

0 comments on commit c5fc4d9

Please sign in to comment.