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

Make unit tests for DllImportGenerator build/run in CI #60598

Merged
merged 5 commits into from
Oct 20, 2021

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Oct 18, 2021

  • Rename DllImportGenerator.UnitTests to DllImportGenerator.Unit.Tests
    • Libraries test build looks for the .Tests suffix. Existing unit test projects in libraries are named .Unit.Tests, so I went with that (instead of making the build also look for .UnitTests).
  • Make Ancillary.Interop build for minimum instead of current version.
    • Lets us compile our unit tests' code snippets against 6.0 reference assemblies.
  • Set NUGET_PACKAGES environment variable to an accessible subdirectory when resolving ref assemblies.

cc @AaronRobinsonMSFT @jkoritzinsky

@jkoritzinsky
Copy link
Member

Looks like we're going to need to point the NUGET_PACKAGES env var at another folder in the Helix machines to get the tests passing as is. Alternatively, we can move these tests to use the live ref pack by packing up the ref assemblies into a zip and sending them to Helix as well. I'm fine with either option for this PR, but we should do the second one at some point before shipping.

@elinor-fung
Copy link
Member Author

Ergh, boo. Maybe that's part of why the other source generator tests explicitly list out all the specific implementation assemblies they need directly...

Trying the NUGET_PACKAGES path for this PR, since I expect we will continue to need that for our down-level unit tests.

Added #60605 to #60212.

@jkoritzinsky jkoritzinsky merged commit 3eecfcd into dotnet:main Oct 20, 2021
@elinor-fung elinor-fung deleted the unitTest branch October 20, 2021 17:31
@ghost ghost locked as resolved and limited conversation to collaborators Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants