fix(test): resolve HOME env race condition in parallel tests

- Use get_home_dir() instead of dirs::home_dir() in get_opencode_dir()
  and get_openclaw_dir() to respect CC_SWITCH_TEST_HOME override
- Add CC_SWITCH_TEST_HOME to all TempHome implementations
- Add #[serial] to all with_test_home tests to share serialization
  with other env-mutating tests
- Remove --test-threads=1 workaround from CI
This commit is contained in:
Jason
2026-04-02 22:08:12 +08:00
parent 8cdc07c860
commit 8b44d9f54d
6 changed files with 46 additions and 7 deletions

View File

@@ -96,4 +96,4 @@ jobs:
run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings
- name: Run tests
run: cargo test --manifest-path src-tauri/Cargo.toml -- --test-threads=1
run: cargo test --manifest-path src-tauri/Cargo.toml