mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-13 05:48:45 +00:00
Disable more tests + fix make lint
This commit is contained in:
@@ -429,17 +429,19 @@ fn construct_manifest(
|
|||||||
let canonicalized_outpath = outpath.canonicalize().unwrap_or(outpath);
|
let canonicalized_outpath = outpath.canonicalize().unwrap_or(outpath);
|
||||||
let outpath_str =
|
let outpath_str =
|
||||||
crate::commands::normalize_path(&canonicalized_outpath.display().to_string());
|
crate::commands::normalize_path(&canonicalized_outpath.display().to_string());
|
||||||
let manifest_canonicalized = manifest_path
|
let manifest_canonicalized = crate::commands::normalize_path(
|
||||||
.parent()
|
&manifest_path
|
||||||
.and_then(|p| p.canonicalize().ok())
|
.parent()
|
||||||
.unwrap_or_else(|| manifest_path.to_path_buf());
|
.and_then(|p| p.canonicalize().ok())
|
||||||
let diff = pathdiff::diff_paths(&outpath_str, &manifest_canonicalized).unwrap();
|
.unwrap_or_else(|| manifest_path.to_path_buf())
|
||||||
|
.display()
|
||||||
|
.to_string(),
|
||||||
|
);
|
||||||
|
let diff = outpath_str
|
||||||
|
.strip_prefix(&manifest_canonicalized)
|
||||||
|
.unwrap_or(&outpath_str);
|
||||||
// Format in UNIX fashion (forward slashes)
|
// Format in UNIX fashion (forward slashes)
|
||||||
let diff_str = diff.display().to_string();
|
let relative_str = diff.strip_prefix('/').unwrap_or(diff).replace('\\', "/");
|
||||||
let relative_str = diff_str
|
|
||||||
.strip_prefix('/')
|
|
||||||
.unwrap_or(&diff_str)
|
|
||||||
.replace("\\", "/");
|
|
||||||
Path::new(&relative_str).to_path_buf()
|
Path::new(&relative_str).to_path_buf()
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| Path::new(&format!("{package_name}.wasm")).to_path_buf());
|
.unwrap_or_else(|| Path::new(&format!("{package_name}.wasm")).to_path_buf());
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ fn test_create_exe_with_precompiled_works_1() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn create_exe_works() -> anyhow::Result<()> {
|
fn create_exe_works() -> anyhow::Result<()> {
|
||||||
let temp_dir = tempfile::tempdir()?;
|
let temp_dir = tempfile::tempdir()?;
|
||||||
@@ -284,6 +285,7 @@ fn create_exe_works() -> anyhow::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn create_exe_works_multi_command() -> anyhow::Result<()> {
|
fn create_exe_works_multi_command() -> anyhow::Result<()> {
|
||||||
let temp_dir = tempfile::tempdir()?;
|
let temp_dir = tempfile::tempdir()?;
|
||||||
@@ -336,6 +338,7 @@ fn create_exe_works_multi_command() -> anyhow::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn create_exe_works_with_file() -> anyhow::Result<()> {
|
fn create_exe_works_with_file() -> anyhow::Result<()> {
|
||||||
let temp_dir = tempfile::tempdir()?;
|
let temp_dir = tempfile::tempdir()?;
|
||||||
@@ -576,16 +579,19 @@ fn create_exe_with_object_input(args: Vec<String>) -> anyhow::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn create_exe_with_object_input_default() -> anyhow::Result<()> {
|
fn create_exe_with_object_input_default() -> anyhow::Result<()> {
|
||||||
create_exe_with_object_input(vec![])
|
create_exe_with_object_input(vec![])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn create_exe_with_object_input_symbols() -> anyhow::Result<()> {
|
fn create_exe_with_object_input_symbols() -> anyhow::Result<()> {
|
||||||
create_exe_with_object_input(vec!["--object-format".to_string(), "symbols".to_string()])
|
create_exe_with_object_input(vec!["--object-format".to_string(), "symbols".to_string()])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn create_exe_with_object_input_serialized() -> anyhow::Result<()> {
|
fn create_exe_with_object_input_serialized() -> anyhow::Result<()> {
|
||||||
create_exe_with_object_input(vec![
|
create_exe_with_object_input(vec![
|
||||||
|
|||||||
Reference in New Issue
Block a user