mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-30 14:31:07 +00:00
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.
21 lines
568 B
Rust
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);
|
|
}
|
|
}
|