diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-20 05:32:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-20 05:32:36 +0900 |
| commit | b151ceaa798a7d2e9b55ffbc4e4b10ea8f0a59a8 (patch) | |
| tree | 1ca5e068027a9bd2a478f2b13c655c31537e2b54 /crates/shirabe/tests/repository/filesystem_repository_test.rs | |
| parent | 6a2040e9c1b200530269d65e5e57f897a4f95584 (diff) | |
| download | php-shirabe-b151ceaa798a7d2e9b55ffbc4e4b10ea8f0a59a8.tar.gz php-shirabe-b151ceaa798a7d2e9b55ffbc4e4b10ea8f0a59a8.tar.zst php-shirabe-b151ceaa798a7d2e9b55ffbc4e4b10ea8f0a59a8.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/repository/filesystem_repository_test.rs')
| -rw-r--r-- | crates/shirabe/tests/repository/filesystem_repository_test.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |
