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

Add projected winrt wrapper for server com interface and add tests #1373

Merged
merged 70 commits into from
Oct 20, 2021

Conversation

sreadingMSFT
Copy link
Contributor

@sreadingMSFT sreadingMSFT commented Aug 16, 2021


The server com interface is wrapped with a winrt dll that just overrides the factory implementation to create the server com classes. Given that implementation there is currently no optimization of client\server communication. If necessary that will need to be explored in a separate checkin. This change also creates the framework for adding tests, with a new test project that runs inside a package. I added a few simple ones here for demonstration purposes but will do the rest in a separate checkin.

Due to unresolved issues on the build server the PackageCom interface that should be registered by the WinGetDev package is not showing up as registered, so the tests are unable to call that. To workaround this issue I've built a version of the WindowsPackageManagerServer.exe as a dll, Microsoft.Management.Deployment.Server.Test.dll, and then included it in the PackagedTests project directly. By giving that project the runFullTrust permission, the test package itself becomes equivalent to the WinGetDev package. Unfortunately this means the com communication itself still does not have automated testing, but the vast majority of the com interface code base is in the Microsoft.Management.Deployment project which is now testable.

Microsoft Reviewers: Open in CodeFlow

@github-actions

This comment has been minimized.

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
Copy link
Contributor Author

@sreadingMSFT sreadingMSFT Aug 16, 2021

Choose a reason for hiding this comment

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

Oops. Changes in this file are from an attempt to re-use the existing tests. Will revert. #Pending

@@ -533,5 +533,9 @@ namespace Microsoft.Management.Deployment
interface Windows.Foundation.Collections.IVectorView<PackageVersionId>;
interface Windows.Foundation.Collections.IVector<PackageVersionInfo>;
interface Windows.Foundation.Collections.IVectorView<PackageVersionInfo>;
interface Windows.Foundation.Collections.IVector<PackageVersionId>;
Copy link
Contributor Author

@sreadingMSFT sreadingMSFT Aug 16, 2021

Choose a reason for hiding this comment

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

Bad merge I guess. Will revert. #Pending

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Member

@JohnMcPMS JohnMcPMS left a comment

Choose a reason for hiding this comment

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

Seems ok as a start for the test infrastructure.

@sreadingMSFT sreadingMSFT merged commit 614f9d2 into microsoft:master Oct 20, 2021
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.

3 participants