Only run runtime_core tests on Android

This commit is contained in:
Mark McCaskey
2020-04-06 14:13:54 -07:00
parent 9d312f4500
commit b6011d5dc4
3 changed files with 241 additions and 235 deletions

View File

@ -169,7 +169,7 @@ test: spectests emtests middleware wasitests test-rest examples
test-android: test-android:
ci/run-docker.sh x86_64-linux-android --manifest-path=lib/singlepass-backend/Cargo.toml ci/run-docker.sh x86_64-linux-android --manifest-path=lib/singlepass-backend/Cargo.toml
ci/run-docker.sh x86_64-linux-android ci/run-docker.sh x86_64-linux-android runtime_core
# Integration tests # Integration tests
integration-tests: release-clif examples integration-tests: release-clif examples

View File

@ -1,6 +1,7 @@
mod runtime_core_tests; mod runtime_core_tests;
use runtime_core_tests::{get_compiler, wat2wasm}; pub mod runtime_core_exception_handling {
use super::runtime_core_tests::{get_compiler, wat2wasm};
use wasmer_runtime_core::{compile_with, imports}; use wasmer_runtime_core::{compile_with, imports};
#[test] #[test]
@ -21,3 +22,4 @@ fn exception_handling_works() {
assert!(instance.call("throw_trap", &[]).is_err()); assert!(instance.call("throw_trap", &[]).is_err());
} }
} }
}

View File

@ -1,6 +1,9 @@
mod runtime_core_tests; mod runtime_core_tests;
use runtime_core_tests::{get_compiler, wat2wasm}; #[cfg(test)]
pub mod runtime_core_imports {
use super::runtime_core_tests::{get_compiler, wat2wasm};
use std::{convert::TryInto, sync::Arc}; use std::{convert::TryInto, sync::Arc};
use wasmer_runtime_core::{ use wasmer_runtime_core::{
compile_with, compile_with,
@ -15,7 +18,7 @@ use wasmer_runtime_core::{
}; };
#[test] #[test]
fn new_api_works() { fn runtime_core_new_api_works() {
let wasm = r#" let wasm = r#"
(module (module
(type $type (func (param i32) (result i32))) (type $type (func (param i32) (result i32)))
@ -472,3 +475,4 @@ test!(
function_closure_trap_with_vmctx_and_env(i32) -> i32, function_closure_trap_with_vmctx_and_env(i32) -> i32,
(1) == Err(RuntimeError(Box::new(format!("! {}", 2 + shift + SHIFT)))) (1) == Err(RuntimeError(Box::new(format!("! {}", 2 + shift + SHIFT))))
); );
}