Skip to content

Commit

Permalink
WIP test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 14, 2018
1 parent 610ade3 commit 50dbdbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
language: rust
cache: cargo
rust:
- nightly

os:
- osx
- linux
- osx

rust:
- nightly
before_script:
# mac os weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- rvm get stable
# in a cronjob, use latest (not pinned) nightly
- if [ "$TRAVIS_EVENT_TYPE" = cron ]; then rustup override set nightly; fi
# actual travis code
# prepare
- export PATH=$HOME/.local/bin:$PATH
- rustup target add i686-unknown-linux-gnu
- rustup target add i686-pc-windows-gnu
- rustup target add i686-pc-windows-msvc
- rustup component add rust-src
- cargo install xargo || echo "skipping xargo install"
- export RUST_SYSROOT=$HOME/rust

script:
- set -e
- |
Expand Down Expand Up @@ -56,6 +53,7 @@ script:
- |
# and run all tests with full mir
cargo test --release --all-features
notifications:
email:
on_success: never
Expand Down
8 changes: 5 additions & 3 deletions src/fn_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,14 +634,16 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
let ptr_size = self.memory.pointer_size();
self.write_scalar(dest, Scalar::from_int(1, ptr_size), dest_ty)?;
},
"GetModuleHandleW" |
"GetProcAddress" |
"InitializeCriticalSection" |
"EnterCriticalSection" |
"TryEnterCriticalSection" |
"LeaveCriticalSection" |
"DeleteCriticalSection" |
"SetLastError" => {
// Function does not return anything, nothing to do
},
"GetModuleHandleW" |
"GetProcAddress" |
"TryEnterCriticalSection" => {
// pretend these do not exist/nothing happened, by returning zero
let ptr_size = self.memory.pointer_size();
self.write_scalar(dest, Scalar::from_int(0, ptr_size), dest_ty)?;
Expand Down

0 comments on commit 50dbdbb

Please sign in to comment.