Skip to content

Commit

Permalink
Run wasm tests like all other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg committed Aug 9, 2018
1 parent 0bd5460 commit 371e779
Show file tree
Hide file tree
Showing 12 changed files with 773 additions and 732 deletions.
17 changes: 0 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,6 @@ matrix:
env: TARGET=x86_64-apple-darwin NO_ADD=1
script: ci/run.sh
- env: TARGET=wasm32-unknown-unknown
before_script:
- git clone --recursive https://github.com/WebAssembly/wabt
- (cd wabt && git reset --hard a0bdeb7 && make -j4)
- export PATH=$PATH:$PWD/wabt/bin
- git clone https://github.com/rustwasm/wasm-bindgen
- (cd wasm-bindgen && cargo install --path crates/cli)
script:
- cargo build --target wasm32-unknown-unknown -p stdsimd
- cargo build --target wasm32-unknown-unknown -p stdsimd --release
- cargo rustc --target wasm32-unknown-unknown -p stdsimd --release --example wasm -- -C lto
- wasm2wat target/wasm32-unknown-unknown/release/examples/wasm.wasm -o wasm.wat
- cat wasm.wat
- grep current_memory wasm.wat
- grep grow_memory wasm.wat
- cd crates/wasm-test
- cargo test --target=$TARGET
- cargo test --target=$TARGET --release
- env: TARGET=thumbv6m-none-eabi NOSTD=1
- env: TARGET=thumbv7m-none-eabi NOSTD=1
- env: TARGET=thumbv7em-none-eabi NOSTD=1
Expand Down
4 changes: 4 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ case ${TARGET} in
*android*)
export STDSIMD_DISABLE_ASSERT_INSTR=1
;;
wasm32*)
# export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+simd128"
;;

*)
;;
esac
Expand Down
3 changes: 3 additions & 0 deletions coresimd/wasm32/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
//! WASM32 intrinsics
#[macro_use]
#[cfg(not(test))]
mod simd128;
#[cfg(test)]
pub mod simd128;
pub use self::simd128::*;

extern "C" {
Expand Down
Loading

0 comments on commit 371e779

Please sign in to comment.