2018-12-10 02:47:34 +00:00
|
|
|
extern crate wabt;
|
|
|
|
|
2018-12-10 03:21:28 +00:00
|
|
|
use std::env;
|
|
|
|
|
|
|
|
mod emtests;
|
2018-12-10 02:47:34 +00:00
|
|
|
mod spectests;
|
|
|
|
|
2018-12-10 03:21:28 +00:00
|
|
|
static SPECTESTS_ENV_VAR: &str = "WASM_GENERATE_SPECTESTS";
|
|
|
|
static EMTESTS_ENV_VAR: &str = "WASM_GENERATE_EMTESTS";
|
|
|
|
|
2018-12-10 02:47:34 +00:00
|
|
|
fn main() {
|
2018-12-10 03:21:28 +00:00
|
|
|
if env::var(SPECTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" {
|
|
|
|
spectests::build();
|
|
|
|
}
|
|
|
|
if env::var(EMTESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" {
|
|
|
|
emtests::build();
|
|
|
|
}
|
2018-12-10 02:47:34 +00:00
|
|
|
}
|