mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 13:55:33 +00:00
Fix up tests for CI
This commit is contained in:
parent
dfa6247075
commit
52cbb60743
11
Makefile
11
Makefile
@ -35,13 +35,18 @@ generate: generate-emtests generate-wasitests
|
||||
|
||||
# Spectests
|
||||
spectests-singlepass:
|
||||
cargo test test_run_spectests --release --no-default-features --features "wasi backend-singlepass" -- --nocapture --test-threads 1
|
||||
SPECTEST_TEST_SINGLEPASS=1 cargo test test_run_spectests --release --no-default-features --features "wasi backend-singlepass" -- --nocapture --test-threads 1
|
||||
|
||||
spectests-cranelift:
|
||||
cargo test test_run_spectests --release --no-default-features --features "wasi backend-cranelift" -- --nocapture
|
||||
|
||||
spectests-llvm:
|
||||
cargo test test_run_spectests --release --no-default-features --features "wasi backend-llvm" -- --nocapture
|
||||
SPECTEST_TEST_LLVM=1 cargo test test_run_spectests --release --no-default-features --features "wasi backend-llvm wasmer-llvm-backend/test" -- --nocapture
|
||||
|
||||
spectests-all:
|
||||
SPECTEST_TEST_CLIF=1 SPECTEST_TEST_LLVM=1 SPECTEST_TEST_SINGLEPASS=1 \
|
||||
cargo test test_run_spectests --release --no-default-features --features "wasi backend-cranelift backend-singlepass backend-llvm wasmer-llvm-backend/test" -- --nocapture --test-threads 1
|
||||
|
||||
|
||||
spectests: spectests-singlepass spectests-cranelift spectests-llvm
|
||||
|
||||
@ -81,7 +86,7 @@ wasitests-setup:
|
||||
mkdir -p tests/wasi_test_resources/test_fs/temp
|
||||
|
||||
wasitests-singlepass: wasitests-setup
|
||||
cargo test wasitest --release --no-default-features --features "wasi singlepass" -- --test-threads=1
|
||||
cargo test wasitest --release --no-default-features --features "wasi backend-singlepass" -- --test-threads=1
|
||||
|
||||
wasitests-cranelift: wasitests-setup
|
||||
cargo test wasitest --release --no-default-features --features "wasi backend-cranelift" -- --test-threads=1 --nocapture
|
||||
|
@ -169,6 +169,7 @@ fn get_compiler(limit: u64, metering: bool) -> impl Compiler {
|
||||
)))]
|
||||
compile_error!("compiler not specified, activate a compiler via features");
|
||||
|
||||
#[cfg(feature = "backend-cranelift")]
|
||||
fn get_compiler(_limit: u64, metering: bool) -> impl Compiler {
|
||||
unimplemented!("cranelift does not implement metering");
|
||||
use wasmer_clif_backend::CraneliftCompiler;
|
||||
|
@ -5,6 +5,7 @@ RUN apt-get update && \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gcc \
|
||||
g++ \
|
||||
libc-dev \
|
||||
python \
|
||||
unzip \
|
||||
|
@ -140,10 +140,12 @@ extern "C" {
|
||||
pub fn lstat(path: *const libc::c_char, buf: *mut stat) -> c_int;
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "freebsd", target_os = "macos", target_os = "android")))]
|
||||
use libc::fallocate;
|
||||
#[cfg(target_os = "freebsd")]
|
||||
use libc::madvise;
|
||||
#[cfg(not(any(target_os = "freebsd", target_os = "macos")))]
|
||||
use libc::{fallocate, fdatasync, ftruncate64, lstat, madvise, wait4};
|
||||
use libc::{fdatasync, ftruncate64, lstat, madvise, wait4};
|
||||
|
||||
// Another conditional constant for name resolution: Macos et iOS use
|
||||
// SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket.
|
||||
@ -1131,11 +1133,11 @@ pub fn ___syscall324(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_in
|
||||
let _mode: c_int = varargs.get(ctx);
|
||||
let _offset: off_t = varargs.get(ctx);
|
||||
let _len: off_t = varargs.get(ctx);
|
||||
#[cfg(not(any(target_os = "freebsd", target_os = "macos")))]
|
||||
#[cfg(not(any(target_os = "freebsd", target_os = "macos", target_os = "android")))]
|
||||
unsafe {
|
||||
fallocate(_fd, _mode, _offset, _len)
|
||||
}
|
||||
#[cfg(any(target_os = "freebsd", target_os = "macos"))]
|
||||
#[cfg(any(target_os = "freebsd", target_os = "macos", target_os = "android"))]
|
||||
{
|
||||
unimplemented!("emscripten::___syscall324 (fallocate) {}", _which)
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ use time;
|
||||
use super::env;
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
use libc::{CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME};
|
||||
|
||||
#[cfg(target_os = "freebsd")]
|
||||
|
@ -100,6 +100,7 @@ const SHIFT: i32 = 10;
|
||||
#[allow(non_upper_case_globals)]
|
||||
const shift: i32 = 100;
|
||||
|
||||
#[cfg(all(unix, target_arch = "x86_64"))]
|
||||
fn imported_functions_forms(test: &dyn Fn(&Instance)) {
|
||||
const MODULE: &str = r#"
|
||||
(module
|
||||
@ -391,6 +392,7 @@ fn callback_fn_trap_with_vmctx(vmctx: &mut vm::Ctx, n: i32) -> Result<i32, Strin
|
||||
|
||||
macro_rules! test {
|
||||
($test_name:ident, $function:ident( $( $inputs:ty ),* ) -> $output:ty, ( $( $arguments:expr ),* ) == $expected_value:expr) => {
|
||||
#[cfg(all(unix, target_arch = "x86_64"))]
|
||||
#[test]
|
||||
fn $test_name() {
|
||||
imported_functions_forms(&|instance| {
|
||||
|
@ -7,6 +7,13 @@
|
||||
unreachable_patterns
|
||||
)]
|
||||
|
||||
#[cfg(not(any(
|
||||
feature = "backend-llvm",
|
||||
feature = "backend-cranelift",
|
||||
feature = "backend-singlepass"
|
||||
)))]
|
||||
compile_error!("No compiler backend detected: please specify at least one compiler backend!");
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
@ -19,6 +26,7 @@ mod tests {
|
||||
// TODO Allow running WAST &str directly (E.g. for use outside of spectests)
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::env;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
struct SpecFailure {
|
||||
@ -72,19 +80,36 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_available_compilers() -> &'static [&'static str] {
|
||||
&[
|
||||
#[cfg(feature = "backend-cranelift")]
|
||||
fn get_compiler_name() -> &'static str {
|
||||
"clif"
|
||||
}
|
||||
|
||||
"clif",
|
||||
#[cfg(feature = "backend-llvm")]
|
||||
fn get_compiler_name() -> &'static str {
|
||||
"llvm"
|
||||
"llvm",
|
||||
#[cfg(feature = "backend-singlepass")]
|
||||
"singlepass",
|
||||
]
|
||||
}
|
||||
|
||||
#[cfg(feature = "backend-singlepass")]
|
||||
fn get_compiler_name() -> &'static str {
|
||||
"singlepass"
|
||||
fn get_compilers_to_test() -> Vec<&'static str> {
|
||||
let mut out = vec![];
|
||||
if let Ok(v) = env::var("SPECTEST_TEST_CLIF") {
|
||||
if v == "1" {
|
||||
out.push("clif");
|
||||
}
|
||||
}
|
||||
if let Ok(v) = env::var("SPECTEST_TEST_LLVM") {
|
||||
if v == "1" {
|
||||
out.push("llvm");
|
||||
}
|
||||
}
|
||||
if let Ok(v) = env::var("SPECTEST_TEST_SINGLEPASS") {
|
||||
if v == "1" {
|
||||
out.push("singlepass");
|
||||
}
|
||||
}
|
||||
|
||||
out
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
@ -216,16 +241,6 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
feature = "backend-llvm",
|
||||
feature = "backend-cranelift",
|
||||
feature = "backend-singlepass"
|
||||
)))]
|
||||
fn get_compiler_name() -> &'static str {
|
||||
panic!("compiler not specified, activate a compiler via features");
|
||||
"unknown"
|
||||
}
|
||||
|
||||
fn with_instance<F, R>(
|
||||
maybe_instance: Option<Arc<Mutex<Instance>>>,
|
||||
named_modules: &HashMap<String, Arc<Mutex<Instance>>>,
|
||||
@ -249,15 +264,16 @@ mod tests {
|
||||
use std::fs;
|
||||
use std::panic::AssertUnwindSafe;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use wabt::script::{Action, Command, CommandKind, ScriptParser, Value};
|
||||
use wasmer_runtime::{
|
||||
compile_with_config,
|
||||
compile_with_config_with, compiler_for_backend,
|
||||
error::CompileError,
|
||||
func, imports,
|
||||
types::{ElementType, MemoryDescriptor, TableDescriptor},
|
||||
units::Pages,
|
||||
CompilerConfig, Ctx, Export, Features, Global, ImportObject, Instance, LikeNamespace,
|
||||
Memory, Table,
|
||||
Backend, CompilerConfig, Ctx, Export, Features, Global, ImportObject, Instance,
|
||||
LikeNamespace, Memory, Table,
|
||||
};
|
||||
|
||||
fn format_panic(e: &dyn std::any::Any) -> String {
|
||||
@ -274,6 +290,7 @@ mod tests {
|
||||
path: &PathBuf,
|
||||
file_excludes: &HashSet<String>,
|
||||
excludes: &HashMap<String, Vec<Exclude>>,
|
||||
backend: &'static str,
|
||||
) -> Result<TestReport, String> {
|
||||
let mut test_report = TestReport {
|
||||
failures: vec![],
|
||||
@ -310,8 +327,12 @@ mod tests {
|
||||
.map(|file| file.iter().map(|x| Some(x.clone())).collect())
|
||||
.unwrap_or(vec![]);
|
||||
let excludes = &mut excludes;
|
||||
|
||||
let backend = get_compiler_name();
|
||||
let backend_enum = Backend::from_str(if backend == "clif" {
|
||||
"cranelift"
|
||||
} else {
|
||||
backend
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
while let Some(Command { kind, line }) =
|
||||
parser.next().map_err(|e| format!("Parse err: {:?}", e))?
|
||||
@ -344,7 +365,10 @@ mod tests {
|
||||
enable_verification: true,
|
||||
..Default::default()
|
||||
};
|
||||
let module = compile_with_config(&module.into_vec(), config)
|
||||
|
||||
let compiler = compiler_for_backend(backend_enum).unwrap();
|
||||
let module =
|
||||
compile_with_config_with(&module.into_vec(), config, &*compiler)
|
||||
.expect("WASM can't be compiled");
|
||||
let i = module
|
||||
.instantiate(&spectest_import_object)
|
||||
@ -784,7 +808,9 @@ mod tests {
|
||||
enable_verification: true,
|
||||
..Default::default()
|
||||
};
|
||||
compile_with_config(&module.into_vec(), config)
|
||||
|
||||
let compiler = compiler_for_backend(backend_enum).unwrap();
|
||||
compile_with_config_with(&module.into_vec(), config, &*compiler)
|
||||
});
|
||||
match result {
|
||||
Ok(module) => {
|
||||
@ -838,7 +864,9 @@ mod tests {
|
||||
enable_verification: true,
|
||||
..Default::default()
|
||||
};
|
||||
compile_with_config(&module.into_vec(), config)
|
||||
|
||||
let compiler = compiler_for_backend(backend_enum).unwrap();
|
||||
compile_with_config_with(&module.into_vec(), config, &*compiler)
|
||||
});
|
||||
|
||||
match result {
|
||||
@ -891,7 +919,9 @@ mod tests {
|
||||
enable_verification: true,
|
||||
..Default::default()
|
||||
};
|
||||
let module = compile_with_config(&module.into_vec(), config)
|
||||
|
||||
let compiler = compiler_for_backend(backend_enum).unwrap();
|
||||
let module = compile_with_config_with(&module.into_vec(), config, &*compiler)
|
||||
.expect("WASM can't be compiled");
|
||||
let result = panic::catch_unwind(AssertUnwindSafe(|| {
|
||||
module
|
||||
@ -988,7 +1018,10 @@ mod tests {
|
||||
enable_verification: true,
|
||||
..Default::default()
|
||||
};
|
||||
let module = compile_with_config(&module.into_vec(), config)
|
||||
|
||||
let compiler = compiler_for_backend(backend_enum).unwrap();
|
||||
let module =
|
||||
compile_with_config_with(&module.into_vec(), config, &*compiler)
|
||||
.expect("WASM can't be compiled");
|
||||
module.instantiate(&spectest_import_object)
|
||||
}));
|
||||
@ -1294,16 +1327,15 @@ mod tests {
|
||||
use std::io::{BufRead, BufReader};
|
||||
|
||||
/// Reads the excludes.txt file into a hash map
|
||||
fn read_excludes() -> (HashMap<String, Vec<Exclude>>, HashSet<String>) {
|
||||
fn read_excludes(current_backend: &str) -> (HashMap<String, Vec<Exclude>>, HashSet<String>) {
|
||||
let mut excludes_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
excludes_path.push("tests");
|
||||
excludes_path.push("spectests");
|
||||
excludes_path.push("excludes.txt");
|
||||
let input = File::open(dbg!(excludes_path)).unwrap();
|
||||
let input = File::open(excludes_path).unwrap();
|
||||
let buffered = BufReader::new(input);
|
||||
let mut result = HashMap::new();
|
||||
let mut file_excludes = HashSet::new();
|
||||
let current_backend = get_compiler_name();
|
||||
let current_target_os = get_target_os();
|
||||
let current_target_family = get_target_family();
|
||||
let current_target_arch = get_target_arch();
|
||||
@ -1374,21 +1406,42 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_run_spectests() {
|
||||
let mut success = true;
|
||||
let mut test_reports = vec![];
|
||||
|
||||
let (excludes, file_excludes) = read_excludes();
|
||||
|
||||
let mut glob_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
glob_path.push("tests");
|
||||
glob_path.push("spectests");
|
||||
glob_path.push("*.wast");
|
||||
|
||||
let available_compilers = get_available_compilers()
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect::<HashSet<&'static str>>();
|
||||
let desired_compilers = get_compilers_to_test();
|
||||
// default to testing all enabled compilers
|
||||
let compilers_to_test = if desired_compilers.is_empty() {
|
||||
available_compilers.iter().cloned().collect::<Vec<_>>()
|
||||
} else {
|
||||
desired_compilers
|
||||
.iter()
|
||||
.cloned()
|
||||
.filter(|c| available_compilers.contains(c))
|
||||
.collect::<Vec<_>>()
|
||||
};
|
||||
|
||||
// if we've asked to run specific compilers, make sure they're all actually enabled
|
||||
if !desired_compilers.is_empty() && desired_compilers.len() != compilers_to_test.len() {
|
||||
panic!("Asked to run spectests with `{:?}` compilers but `{:?}` compilers are enabled (found {} of them: {:?})", desired_compilers, get_compilers_to_test(), compilers_to_test.len(), compilers_to_test);
|
||||
}
|
||||
|
||||
let glob_str = glob_path.to_str().unwrap();
|
||||
for backend in compilers_to_test {
|
||||
println!("Testing `{}` backend", backend);
|
||||
let (excludes, file_excludes) = read_excludes(backend);
|
||||
let mut test_reports = vec![];
|
||||
let mut success = true;
|
||||
for entry in glob(glob_str).expect("Failed to read glob pattern") {
|
||||
match entry {
|
||||
Ok(wast_path) => {
|
||||
let result = parse_and_run(&wast_path, &file_excludes, &excludes);
|
||||
let result = parse_and_run(&wast_path, &file_excludes, &excludes, backend);
|
||||
match result {
|
||||
Ok(test_report) => {
|
||||
if test_report.has_failures() {
|
||||
@ -1419,8 +1472,8 @@ mod tests {
|
||||
}
|
||||
|
||||
println!("");
|
||||
println!("{} backend results:", backend);
|
||||
println!("Failures:");
|
||||
let backend = get_compiler_name();
|
||||
for failure in failures.iter() {
|
||||
// To print excludes for all failures:
|
||||
println!(
|
||||
@ -1439,8 +1492,11 @@ mod tests {
|
||||
println!("failed: {}", total_failed);
|
||||
println!("allowed failures: {}", total_allowed_failures);
|
||||
println!("");
|
||||
println!("Tests {}.", if success { "passed" } else { "failed" });
|
||||
println!("");
|
||||
assert!(success, "tests passed")
|
||||
}
|
||||
}
|
||||
|
||||
/// Bit pattern of an f32 value:
|
||||
/// 1-bit sign + 8-bit mantissa + 23-bit exponent = 32 bits
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_snapshot1_close_preopen_fd() {
|
||||
@ -10,7 +9,10 @@ fn test_snapshot1_close_preopen_fd() {
|
||||
"../wasi_test_resources/snapshot1/close_preopen_fd.wasm",
|
||||
"snapshot1_close_preopen_fd",
|
||||
vec![],
|
||||
vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
"hamlet".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/close_preopen_fd.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_create_dir() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_envvar() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_snapshot1_fd_allocate() {
|
||||
@ -10,7 +9,10 @@ fn test_snapshot1_fd_allocate() {
|
||||
"../wasi_test_resources/snapshot1/fd_allocate.wasm",
|
||||
"snapshot1_fd_allocate",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_allocate.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_fd_append() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/fd_append.wasm",
|
||||
"snapshot1_fd_append",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_append.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_snapshot1_fd_close() {
|
||||
@ -10,7 +9,10 @@ fn test_snapshot1_fd_close() {
|
||||
"../wasi_test_resources/snapshot1/fd_close.wasm",
|
||||
"snapshot1_fd_close",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_close.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_snapshot1_fd_pread() {
|
||||
@ -10,7 +9,10 @@ fn test_snapshot1_fd_pread() {
|
||||
"../wasi_test_resources/snapshot1/fd_pread.wasm",
|
||||
"snapshot1_fd_pread",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_pread.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_snapshot1_fd_read() {
|
||||
@ -10,7 +9,10 @@ fn test_snapshot1_fd_read() {
|
||||
"../wasi_test_resources/snapshot1/fd_read.wasm",
|
||||
"snapshot1_fd_read",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_read.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_fd_sync() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/fd_sync.wasm",
|
||||
"snapshot1_fd_sync",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_sync.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_file_metadata() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_fs_sandbox_test() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_fseek() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/fseek.wasm",
|
||||
"snapshot1_fseek",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fseek.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_hello() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_isatty() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_mapdir() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/mapdir.wasm",
|
||||
"snapshot1_mapdir",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/mapdir.out"
|
||||
);
|
||||
|
@ -2,14 +2,22 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_path_link() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/path_link.wasm",
|
||||
"snapshot1_path_link",
|
||||
vec![],
|
||||
vec![("act5".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![
|
||||
(
|
||||
"act5".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5")
|
||||
),
|
||||
(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/path_link.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_path_rename() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/path_rename.wasm",
|
||||
"snapshot1_path_rename",
|
||||
vec![],
|
||||
vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/path_rename.out"
|
||||
);
|
||||
|
@ -2,14 +2,22 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_path_symlink() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/path_symlink.wasm",
|
||||
"snapshot1_path_symlink",
|
||||
vec![],
|
||||
vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![
|
||||
(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),
|
||||
(
|
||||
"hamlet".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/path_symlink.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_snapshot1_poll_oneoff() {
|
||||
@ -10,7 +9,16 @@ fn test_snapshot1_poll_oneoff() {
|
||||
"../wasi_test_resources/snapshot1/poll_oneoff.wasm",
|
||||
"snapshot1_poll_oneoff",
|
||||
vec![],
|
||||
vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![
|
||||
(
|
||||
"hamlet".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),
|
||||
(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/poll_oneoff.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_quine() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_readlink() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/readlink.wasm",
|
||||
"snapshot1_readlink",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/readlink.out"
|
||||
);
|
||||
|
@ -2,14 +2,26 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_wasi_sees_virtual_root() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/wasi_sees_virtual_root.wasm",
|
||||
"snapshot1_wasi_sees_virtual_root",
|
||||
vec![],
|
||||
vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),],
|
||||
vec![
|
||||
(
|
||||
"act1".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
(
|
||||
"act2".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")
|
||||
),
|
||||
(
|
||||
"act1-again".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/wasi_sees_virtual_root.out"
|
||||
);
|
||||
|
@ -2,14 +2,26 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_snapshot1_writing() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/snapshot1/writing.wasm",
|
||||
"snapshot1_writing",
|
||||
vec![],
|
||||
vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),],
|
||||
vec![
|
||||
(
|
||||
"act1".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
(
|
||||
"act2".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")
|
||||
),
|
||||
(
|
||||
"act1-again".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/writing.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_close_preopen_fd() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/close_preopen_fd.wasm",
|
||||
"unstable_close_preopen_fd",
|
||||
vec![],
|
||||
vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
"hamlet".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/close_preopen_fd.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_create_dir() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_envvar() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fd_allocate() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fd_allocate.wasm",
|
||||
"unstable_fd_allocate",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_allocate.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fd_append() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fd_append.wasm",
|
||||
"unstable_fd_append",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_append.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fd_close() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fd_close.wasm",
|
||||
"unstable_fd_close",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_close.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fd_pread() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fd_pread.wasm",
|
||||
"unstable_fd_pread",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_pread.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fd_read() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fd_read.wasm",
|
||||
"unstable_fd_read",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_read.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fd_sync() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fd_sync.wasm",
|
||||
"unstable_fd_sync",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fd_sync.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_file_metadata() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fs_sandbox_test() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_fseek() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/fseek.wasm",
|
||||
"unstable_fseek",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/fseek.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_hello() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_isatty() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_mapdir() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/mapdir.wasm",
|
||||
"unstable_mapdir",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/mapdir.out"
|
||||
);
|
||||
|
@ -2,14 +2,22 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_path_link() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/path_link.wasm",
|
||||
"unstable_path_link",
|
||||
vec![],
|
||||
vec![("act5".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![
|
||||
(
|
||||
"act5".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5")
|
||||
),
|
||||
(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/path_link.out"
|
||||
);
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_path_rename() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/path_rename.wasm",
|
||||
"unstable_path_rename",
|
||||
vec![],
|
||||
vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/path_rename.out"
|
||||
);
|
||||
|
@ -2,14 +2,22 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_path_symlink() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/path_symlink.wasm",
|
||||
"unstable_path_symlink",
|
||||
vec![],
|
||||
vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![
|
||||
(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),
|
||||
(
|
||||
"hamlet".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/path_symlink.out"
|
||||
);
|
||||
|
@ -2,14 +2,22 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_poll_oneoff() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/poll_oneoff.wasm",
|
||||
"unstable_poll_oneoff",
|
||||
vec![],
|
||||
vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),],
|
||||
vec![
|
||||
(
|
||||
"hamlet".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),
|
||||
(
|
||||
"temp".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/poll_oneoff.out"
|
||||
);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_quine() {
|
||||
assert_wasi_output!(
|
||||
|
@ -2,14 +2,16 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_readlink() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/readlink.wasm",
|
||||
"unstable_readlink",
|
||||
vec![],
|
||||
vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),],
|
||||
vec![(
|
||||
".".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")
|
||||
),],
|
||||
vec![],
|
||||
"../wasi_test_resources/readlink.out"
|
||||
);
|
||||
|
@ -2,14 +2,26 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_wasi_sees_virtual_root() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/wasi_sees_virtual_root.wasm",
|
||||
"unstable_wasi_sees_virtual_root",
|
||||
vec![],
|
||||
vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),],
|
||||
vec![
|
||||
(
|
||||
"act1".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
(
|
||||
"act2".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")
|
||||
),
|
||||
(
|
||||
"act1-again".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/wasi_sees_virtual_root.out"
|
||||
);
|
||||
|
@ -2,14 +2,26 @@
|
||||
// ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME
|
||||
// Files autogenerated with cargo build.
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_unstable_writing() {
|
||||
assert_wasi_output!(
|
||||
"../wasi_test_resources/unstable/writing.wasm",
|
||||
"unstable_writing",
|
||||
vec![],
|
||||
vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),],
|
||||
vec![
|
||||
(
|
||||
"act1".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
(
|
||||
"act2".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")
|
||||
),
|
||||
(
|
||||
"act1-again".to_string(),
|
||||
::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")
|
||||
),
|
||||
],
|
||||
vec![],
|
||||
"../wasi_test_resources/writing.out"
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user