From 0dd510dbc3a5b6e888abcc104ae8c4a4eeb1e42b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 25 Jun 2026 17:14:07 +0900 Subject: feat(shim): implement stream_select/stream_set_blocking via libc Add fcntl/select extern "C" declarations and a PhpResource::raw_fd seam so the symfony Process pipe loop can read a live child's stdout/stderr. Fix fread on a non-blocking fd (WouldBlock -> "") and the Process null-cwd default. Real subprocess output capture now works; un-ignore the process_executor tests. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/util/process_executor_test.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crates/shirabe/tests/util/process_executor_test.rs') diff --git a/crates/shirabe/tests/util/process_executor_test.rs b/crates/shirabe/tests/util/process_executor_test.rs index 342c7ff..01e37ed 100644 --- a/crates/shirabe/tests/util/process_executor_test.rs +++ b/crates/shirabe/tests/util/process_executor_test.rs @@ -20,7 +20,6 @@ use shirabe_external_packages::symfony::console::output::output_interface::{ }; use shirabe_php_shim::{PHP_EOL, trim}; -#[ignore] #[test] fn test_execute_captures_output() { let mut process = ProcessExecutor::new(None); @@ -41,7 +40,7 @@ fn test_use_io_is_not_null_and_if_not_captured() { todo!() } -#[ignore] +#[ignore = "stderr capture works, but the test cwd (crates/shirabe) contains a `foo/` fixture dir, so `cat foo` reports \"Is a directory\" instead of \"No such file or directory\""] #[test] fn test_execute_captures_stderr() { let mut process = ProcessExecutor::new(None); @@ -89,7 +88,6 @@ fn hide_password_provider() -> Vec<(&'static str, &'static str)> { ] } -#[ignore] #[test] fn test_hide_passwords() { for (command, expected_command_output) in hide_password_provider() { @@ -107,7 +105,6 @@ fn test_hide_passwords() { } } -#[ignore] #[test] fn test_doesnt_hide_ports() { let buffer = Rc::new(RefCell::new( @@ -130,7 +127,6 @@ fn test_split_lines() { todo!() } -#[ignore] #[test] fn test_console_io_does_not_format_symfony_console_style() { let output = Rc::new(RefCell::new(BufferedOutput::new( -- cgit v1.3.1