-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5343: Encryption-related tests failing locally #1564
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
Conversation
| </PropertyGroup> | ||
|
|
||
| <Target Name="DownloadNativeBinaries_linux_x64" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/linux/x64/libmongocrypt.so')"> | ||
| <MSBuild Projects ="$(MSBuildProjectFullPath)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is where the main magic is situated: we call MSBuild to start "another" project, which is actually the same project ($(MSBuildProjectFullPath)) by explicitly invoking Target named DownloadNativeBinary and pass some variables that define where the file should be pulled from. Also important stuff: we set TargetFramework=once, this is to override default Targets we have. If we do not override that - the target will be started 3 times (once per existing target framework).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yep - repeat for each file to download.
| </Target> | ||
|
|
||
| <Target Name="DownloadNativeBinaries_Alpine" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/linux/alpine/libmongocrypt.so')"> | ||
| <Target Name="DownloadNativeBinary"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Target is the one that actually doing the work.
| <ItemGroup> | ||
| <Content Include="$(MSBuildProjectDirectory)/linux/x64/libmongocrypt.so"> | ||
| <Link>libmongocrypt\linux-x64\libmongocrypt.so</Link> | ||
| <Content Include="$(MSBuildProjectDirectory)/runtimes/osx/native/libmongocrypt.dylib"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed where we store the file in project folder to match the library search path, so we do not need to set the LIBMONGOCRYPT_PATH env variable anymore. Path to the file in the package was not changed.
adelinowona
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.