Skip to content

Use single-threaded checkout in tests #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,16 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: More writes_through_symlinks_are_prevented_even_if_overwriting_is_allowed reps
- name: Increase writes_through_symlinks_are_prevented_even_if_overwriting_is_allowed reps
run: |
# Prepend leading digits "24" to the upper bound of the label range.
sed -Ei 's/^(#\[test_matrix\(0\.\.=)([[:digit:]]+\)])$/\124\2/' \
gix-worktree-state/tests/state/checkout.rs
- name: Display the changes made for this test
run: git diff
- name: Test writes_through_symlinks_are_prevented_even_if_overwriting_is_allowed (nextest)
run: |
cargo nextest run -p gix-worktree-state-tests \
cargo nextest run -p gix-worktree-state-tests --no-default-features \
writes_through_symlinks_are_prevented_even_if_overwriting_is_allowed \
--status-level=fail --test-threads=${{ matrix.parallel-tests }}

Expand Down
3 changes: 2 additions & 1 deletion gix-worktree-state/tests/state/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,11 @@ fn probe_gitoxide_dir() -> crate::Result<gix_fs::Capabilities> {
fn opts_from_probe() -> gix_worktree_state::checkout::Options {
static CAPABILITIES: Lazy<gix_fs::Capabilities> = Lazy::new(|| probe_gitoxide_dir().unwrap());

// FIXME(integration): Restore multithreaded `thread_limit` prior to merging #2008.
gix_worktree_state::checkout::Options {
fs: *CAPABILITIES,
destination_is_initially_empty: true,
thread_limit: gix_features::parallel::num_threads(None).into(),
thread_limit: Some(1), // gix_features::parallel::num_threads(None).into(),
..Default::default()
}
}
Expand Down
Loading