Mark McCaskey 6a5efcda98 Update wasi-tests to test multiple versions of WASI
This change also cleans up the `wasi-test` generation a bit.  It's
actually still really, really messy, but at least now it's split up
into easier to understand chunks.

There's still a lot of low-hanging fruit in terms of improving the
readibilty and maintainability of the code.
2020-03-13 15:41:50 -07:00

21 lines
568 B
Rust

use std::env;
mod set_up_toolchain;
mod util;
mod wasi_version;
mod wasitests;
static WASITESTS_ENV_VAR: &str = "WASM_WASI_GENERATE_WASITESTS";
static WASITESTS_SET_UP_TOOLCHAIN: &str = "WASM_WASI_SET_UP_TOOLCHAIN";
fn main() {
let do_all_wasi_tests = util::should_operate_on_all_wasi_tests();
if env::var(WASITESTS_SET_UP_TOOLCHAIN).unwrap_or("0".to_string()) == "1" {
set_up_toolchain::set_it_up(do_all_wasi_tests);
}
if env::var(WASITESTS_ENV_VAR).unwrap_or("0".to_string()) == "1" {
wasitests::build(do_all_wasi_tests);
}
}