|
| 1 | +use serial_test::serial; |
1 | 2 | use std::fs; |
2 | 3 | use std::os::unix::fs::PermissionsExt; |
3 | 4 | use std::process::Command; |
4 | 5 | use tempfile::TempDir; |
5 | 6 |
|
6 | 7 | #[test] |
| 8 | +#[serial] |
7 | 9 | fn test_plugin_system_integration() { |
8 | 10 | // Create a temporary directory for our test plugin |
9 | 11 | let temp_dir = TempDir::new().unwrap(); |
@@ -122,27 +124,14 @@ exit 0 |
122 | 124 | } |
123 | 125 |
|
124 | 126 | #[test] |
| 127 | +#[serial] |
125 | 128 | fn test_builtin_commands_still_work() { |
126 | 129 | // Ensure built-in commands are not affected by plugin system |
127 | 130 |
|
128 | 131 | // Get the current working directory to ensure we run commands from the right place |
129 | 132 | let current_dir = std::env::current_dir().expect("Failed to get current directory"); |
130 | 133 |
|
131 | | - // Build the binary first to avoid compilation races |
132 | | - let build_output = Command::new("cargo") |
133 | | - .args(["build"]) |
134 | | - .current_dir(¤t_dir) |
135 | | - .output() |
136 | | - .expect("Failed to build binary"); |
137 | | - |
138 | | - if !build_output.status.success() { |
139 | | - eprintln!("Build failed:"); |
140 | | - eprintln!("stdout: {}", String::from_utf8_lossy(&build_output.stdout)); |
141 | | - eprintln!("stderr: {}", String::from_utf8_lossy(&build_output.stderr)); |
142 | | - panic!("Cannot run tests without successful build"); |
143 | | - } |
144 | | - |
145 | | - // Test help command |
| 134 | + // Test help command (cargo run will build if needed) |
146 | 135 | let output = Command::new("cargo") |
147 | 136 | .args(["run", "--", "--help"]) |
148 | 137 | .current_dir(¤t_dir) |
|
0 commit comments