-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,15 @@ | |
// there. | ||
#![cfg(not(target_family = "wasm"))] | ||
|
||
use std::sync::Once; | ||
use std::{ | ||
path::{Path, PathBuf}, | ||
sync::Arc, | ||
time::Duration, | ||
}; | ||
|
||
static INIT: Once = Once::new(); | ||
|
||
use reqwest::Client; | ||
use tokio::runtime::Handle; | ||
use wasmer::Engine; | ||
|
@@ -29,6 +32,13 @@ mod wasi { | |
|
||
use super::*; | ||
|
||
fn setup() { | ||
INIT.call_once(|| { | ||
env_logger::builder() | ||
.filter_level(log::LevelFilter::max()) | ||
.init(); | ||
}); | ||
} | ||
#[tokio::test] | ||
async fn can_run_wat2wasm() { | ||
let webc = download_cached("https://wasmer.io/wasmer/[email protected]").await; | ||
|
@@ -40,6 +50,7 @@ mod wasi { | |
|
||
#[tokio::test(flavor = "multi_thread")] | ||
async fn wat2wasm() { | ||
setup(); | ||
let webc = download_cached("https://wasmer.io/wasmer/[email protected]").await; | ||
let container = from_bytes(webc).unwrap(); | ||
let (rt, tasks) = runtime(); | ||
|
@@ -81,6 +92,8 @@ mod wasi { | |
|
||
#[tokio::test(flavor = "multi_thread")] | ||
async fn python() { | ||
setup(); | ||
|
||
let webc = download_cached("https://wasmer.io/python/[email protected]").await; | ||
let (rt, tasks) = runtime(); | ||
let container = from_bytes(webc).unwrap(); | ||
|