mirror of
https://github.com/zhom/banderole.git
synced 2026-04-22 11:56:16 +02:00
test: change executable discovery
This commit is contained in:
+2
-14
@@ -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);
|
||||
|
||||
|
||||
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user