Skip to content
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

test: compile testdata/ only once #6305

Merged
merged 2 commits into from
Nov 14, 2023
Merged

test: compile testdata/ only once #6305

merged 2 commits into from
Nov 14, 2023

Conversation

DaniPopes
Copy link
Member

Motivation

Previously, the first N tests, which start concurrently, would all compile testdata/ and write cache independently. Now, the first test will compile it, and the rest will read from cache.

Solution

Comment on lines 33 to 38
const LOCK: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../testdata/.lock");

let project = &*PROJECT;
assert!(project.cached);

let mut lock = fd_lock::new_lock(LOCK);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we document what's happening here?
and why this is necessary (nextest)

@DaniPopes DaniPopes merged commit 8126b99 into master Nov 14, 2023
19 checks passed
@DaniPopes DaniPopes deleted the dani/more-test-locks branch November 14, 2023 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants