From b151ceaa798a7d2e9b55ffbc4e4b10ea8f0a59a8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Jul 2026 05:32:36 +0900 Subject: test(path-repository): un-ignore test_url_remains_relative The PHP test implicitly requires the process cwd to be an ancestor of the Fixtures dir (phpunit runs inside the composer checkout); cargo runs tests from the crate manifest dir, which is not. Replicate the phpunit precondition with a drop-restoring CwdGuard chdir'ing to the __DIR__ equivalent, and serialize it (together with the only other cwd-mutating test in the repository binary, test_repository_writes_installed_php) via #[serial] so the process-global cwd cannot race. Co-Authored-By: Claude Fable 5 --- crates/shirabe/tests/repository/filesystem_repository_test.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/shirabe/tests/repository/filesystem_repository_test.rs') diff --git a/crates/shirabe/tests/repository/filesystem_repository_test.rs b/crates/shirabe/tests/repository/filesystem_repository_test.rs index 6e7370dc..b0d18c68 100644 --- a/crates/shirabe/tests/repository/filesystem_repository_test.rs +++ b/crates/shirabe/tests/repository/filesystem_repository_test.rs @@ -2,6 +2,7 @@ use crate::test_case::{get_alias_package, get_package}; use indexmap::IndexMap; +use serial_test::serial; use shirabe::dependency_resolver::operation::OperationInterface; use shirabe::installed_versions::InstalledVersions; use shirabe::installer::{InstallationManagerInterface, InstallerInterface}; @@ -215,6 +216,9 @@ fn configure_links( } #[test] +// Serialized because CwdGuard changes the process-global cwd, which would race with the +// cwd-sensitive path_repository_test::test_url_remains_relative in this binary. +#[serial] fn test_repository_writes_installed_php() { let guard = CwdGuard::new(); let dir = guard.path(); -- cgit v1.3.1