Skip to content

Commit

Permalink
Use CRANELIFT instead of CLIF in test env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed Apr 7, 2020
1 parent 3579d0d commit ade38aa
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ crate-type = ["bin"]

[[example]]
name = "callback"
crate-type = ["bin"]
crate-type = ["bin"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spectests-llvm:
SPECTEST_TEST_LLVM=1 cargo test test_run_spectests --release --no-default-features --features "wasi backend-llvm wasmer-llvm-backend/test" -- --nocapture

spectests-all:
SPECTEST_TEST_CLIF=1 SPECTEST_TEST_LLVM=1 SPECTEST_TEST_SINGLEPASS=1 \
SPECTEST_TEST_CRANELIFT=1 SPECTEST_TEST_LLVM=1 SPECTEST_TEST_SINGLEPASS=1 \
cargo test test_run_spectests --release --no-default-features --features "wasi backend-cranelift backend-singlepass backend-llvm wasmer-llvm-backend/test" -- --nocapture --test-threads 1


Expand Down
4 changes: 2 additions & 2 deletions tests/emtests/_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use wasmer_runtime::Backend;
pub fn get_backend() -> Option<Backend> {
#[cfg(feature = "backend-cranelift")]
{
if let Ok(v) = env::var("WASMER_TEST_CLIF") {
if let Ok(v) = env::var("WASMER_TEST_CRANELIFT") {
if v == "1" {
return Some(Backend::Cranelift);
}
Expand Down Expand Up @@ -40,7 +40,7 @@ macro_rules! assert_emscripten_output {
use wasmer_dev_utils::stdio::StdioCapturer;

let wasm_bytes = include_bytes!($file);
let backend = $crate::emtests::_common::get_backend().expect("Please set one of `WASMER_TEST_CLIF`, `WASMER_TEST_LLVM`, or `WASMER_TEST_SINGELPASS` to `1`.");
let backend = $crate::emtests::_common::get_backend().expect("Please set one of `WASMER_TEST_CRANELIFT`, `WASMER_TEST_LLVM`, or `WASMER_TEST_SINGELPASS` to `1`.");
let compiler = wasmer_runtime::compiler_for_backend(backend).expect("The desired compiler was not found!");

let module = wasmer_runtime::compile_with_config_with(&wasm_bytes[..], Default::default(), &*compiler).expect("WASM can't be compiled");
Expand Down
2 changes: 1 addition & 1 deletion tests/generate-emscripten-tests/src/emtests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::io::BufReader;

static BANNER: &str =
"// Rust test file autogenerated with cargo build (generate-emscripten-tests).
// Please do NOT modify it by hand, as it will be reseted on next build.\n";
// Please do NOT modify it by hand, as it will be reset on next build.\n";

const EXTENSIONS: [&str; 2] = ["c", "cpp"];
const EXCLUDES: [&str; 0] = [];
Expand Down
2 changes: 1 addition & 1 deletion tests/spectest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod tests {

fn get_compilers_to_test() -> Vec<&'static str> {
let mut out = vec![];
if let Ok(v) = env::var("SPECTEST_TEST_CLIF") {
if let Ok(v) = env::var("SPECTEST_TEST_CRANELIFT") {
if v == "1" {
out.push("clif");
}
Expand Down
4 changes: 2 additions & 2 deletions tests/wasitests/_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use wasmer_runtime::Backend;
pub fn get_backend() -> Option<Backend> {
#[cfg(feature = "backend-cranelift")]
{
if let Ok(v) = env::var("WASMER_TEST_CLIF") {
if let Ok(v) = env::var("WASMER_TEST_CRANELIFT") {
if v == "1" {
return Some(Backend::Cranelift);
}
Expand Down Expand Up @@ -37,7 +37,7 @@ macro_rules! assert_wasi_output {
use wasmer_wasi::{generate_import_object_for_version, get_wasi_version};

let wasm_bytes = include_bytes!($file);
let backend = $crate::wasitests::_common::get_backend().expect("Please set one of `WASMER_TEST_CLIF`, `WASMER_TEST_LLVM`, or `WASMER_TEST_SINGELPASS` to `1`.");
let backend = $crate::wasitests::_common::get_backend().expect("Please set one of `WASMER_TEST_CRANELIFT`, `WASMER_TEST_LLVM`, or `WASMER_TEST_SINGELPASS` to `1`.");
let compiler = wasmer_runtime::compiler_for_backend(backend).expect("The desired compiler was not found!");

let module = wasmer_runtime::compile_with_config_with(&wasm_bytes[..], Default::default(), &*compiler).expect("WASM can't be compiled");
Expand Down

0 comments on commit ade38aa

Please sign in to comment.