test: change executable discovery

This commit is contained in:
zhom
2025-08-10 00:32:54 +04:00
parent 329f5287d5
commit ddc845c049
2 changed files with 2 additions and 17 deletions
+2 -14
View File
@@ -674,20 +674,8 @@ impl BundlerTestHelper {
fs::set_permissions(executable_path, perms)?;
}
// On Windows, ensure we're using the full path and handle potential issues
let mut cmd = if cfg!(windows) {
// Use the full canonical path on Windows to avoid "program not found" issues
let canonical_path = executable_path.canonicalize().with_context(|| {
format!("Failed to canonicalize path: {}", executable_path.display())
})?;
println!(
"Windows: Using canonical path: {}",
canonical_path.display()
);
Command::new(canonical_path)
} else {
Command::new(executable_path)
};
// Build command to run the executable.
let mut cmd = Command::new(executable_path);
cmd.args(args);
-3
View File
@@ -1201,9 +1201,6 @@ async fn test_bundle_simple_project() {
// Test that the bundle exists
let bundle_path = temp_dir.path().join("test-bundle");
assert!(bundle_path.exists(), "Bundle file not created");
// Note: Testing execution would require extracting and running the bundle,
// which is complex in a test environment
}
#[tokio::test(flavor = "multi_thread")]