mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 02:12:13 +00:00
Move dev-utils
crate into tests
This commit is contained in:
parent
6857cc543f
commit
3d4ed92466
9
Cargo.lock
generated
9
Cargo.lock
generated
@ -2753,6 +2753,7 @@ dependencies = [
|
||||
"generate-emscripten-tests",
|
||||
"generate-wasi-tests",
|
||||
"glob 0.3.0",
|
||||
"libc",
|
||||
"log",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
@ -2761,7 +2762,6 @@ dependencies = [
|
||||
"wabt",
|
||||
"wasmer",
|
||||
"wasmer-clif-backend",
|
||||
"wasmer-dev-utils",
|
||||
"wasmer-emscripten",
|
||||
"wasmer-kernel-loader",
|
||||
"wasmer-llvm-backend",
|
||||
@ -2824,13 +2824,6 @@ dependencies = [
|
||||
"wasmparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-dev-utils"
|
||||
version = "0.16.2"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-emscripten"
|
||||
version = "0.16.2"
|
||||
|
@ -37,7 +37,6 @@ wasmer-emscripten = { path = "lib/emscripten" }
|
||||
wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true }
|
||||
wasmer-wasi = { path = "lib/wasi", optional = true }
|
||||
wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
|
||||
wasmer-dev-utils = { path = "lib/dev-utils", optional = true }
|
||||
wasmer-wasi-experimental-io-devices = { path = "lib/wasi-experimental-io-devices", optional = true }
|
||||
|
||||
[workspace]
|
||||
@ -55,7 +54,6 @@ members = [
|
||||
"lib/middleware-common",
|
||||
"lib/kernel-loader",
|
||||
"lib/kernel-net",
|
||||
"lib/dev-utils",
|
||||
"lib/wasi-experimental-io-devices",
|
||||
"lib/interface-types",
|
||||
"examples/parallel",
|
||||
@ -75,10 +73,10 @@ rustc_version = "0.2"
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
glob = "0.3"
|
||||
libc = "0.2.60" # for `tests/dev-utils`'s Stdout capturing
|
||||
serde = { version = "1", features = ["derive"] } # used by the plugin example
|
||||
typetag = "0.1" # used by the plugin example
|
||||
wabt = "0.9.1"
|
||||
wasmer-dev-utils = { path = "lib/dev-utils" }
|
||||
|
||||
[features]
|
||||
default = ["fast-tests", "wasi", "backend-cranelift", "wabt"]
|
||||
|
@ -1,12 +0,0 @@
|
||||
[package]
|
||||
name = "wasmer-dev-utils"
|
||||
version = "0.16.2"
|
||||
description = "Wasmer runtime core library"
|
||||
license = "MIT"
|
||||
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
||||
edition = "2018"
|
||||
repository = "https://github.com/wasmerio/wasmer"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2.60"
|
@ -1,3 +0,0 @@
|
||||
# Dev Utils
|
||||
|
||||
This is shared code between the modules for testing and development only. Code in this crate will not be shipped.
|
@ -1,5 +0,0 @@
|
||||
#![doc(html_favicon_url = "https://wasmer.io/static/icons/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://avatars3.githubusercontent.com/u/44205449?s=200&v=4")]
|
||||
|
||||
pub mod file_descriptor;
|
||||
pub mod stdio;
|
2
tests/dev_utils/mod.rs
Normal file
2
tests/dev_utils/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod file_descriptor;
|
||||
pub mod stdio;
|
@ -1 +1,2 @@
|
||||
pub mod dev_utils;
|
||||
mod emtests;
|
||||
|
@ -37,7 +37,7 @@ macro_rules! assert_emscripten_output {
|
||||
EmscriptenGlobals,
|
||||
generate_emscripten_env,
|
||||
};
|
||||
use wasmer_dev_utils::stdio::StdioCapturer;
|
||||
use crate::dev_utils::stdio::StdioCapturer;
|
||||
|
||||
let wasm_bytes = include_bytes!($file);
|
||||
let backend = $crate::emtests::_common::get_backend().expect("Please set one of `WASMER_TEST_CRANELIFT`, `WASMER_TEST_LLVM`, or `WASMER_TEST_SINGELPASS` to `1`.");
|
||||
|
@ -1 +1,2 @@
|
||||
pub mod dev_utils;
|
||||
mod wasitests;
|
||||
|
@ -32,7 +32,7 @@ pub fn get_backend() -> Option<Backend> {
|
||||
|
||||
macro_rules! assert_wasi_output {
|
||||
($file:expr, $name:expr, $po_dir_args: expr, $mapdir_args:expr, $envvar_args:expr, $expected:expr) => {{
|
||||
use wasmer_dev_utils::stdio::StdioCapturer;
|
||||
use crate::dev_utils::stdio::StdioCapturer;
|
||||
use wasmer_runtime::Func;
|
||||
use wasmer_wasi::{generate_import_object_for_version, get_wasi_version};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user