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

Allow for parallel expansion test execution #45

Merged
merged 8 commits into from
Jul 9, 2020
Merged

Conversation

eupn
Copy link
Owner

@eupn eupn commented Jul 9, 2020

Closes #44.

Comment on lines +29 to +30
/// This `Drop` implementation will clean up the temporary crates when expansion is finished.
/// This is to prevent pollution of the filesystem with dormant files.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to mean that every time macrotest::expand is called, all dependencies are re-compiled. For example, the following code will re-compile the dependencies three times, right?

#[test]
fn test() {
    macrotest::expand("tests/expand/a.rs");
    macrotest::expand("tests/expand/b.rs");
    macrotest::expand("tests/expand/c.rs");
}

If so, It may significantly increase the test time. (this is probably an unavoidable cost if the test is may conflicts)
Perhaps it seems preferable to adjust the documentation to recommend using wildcard(*) or expose a type like trybuild::TestCases.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Makes sense! Yes, I'm afraid that dependencies will be recompiled for each set. I'll update the docs.

@eupn eupn merged commit b83c60d into master Jul 9, 2020
@eupn eupn deleted the unique-temp-crates branch July 9, 2020 12:14
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.

Bug: Running multiple expansion tests may interfere with each other
2 participants