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