diff --git a/SECURITY.md b/SECURITY.md index 869fdfe2b2..f0c2dc14f4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,7 +14,7 @@ Instead, please report them to the Microsoft Security Response Center (MSRC) at If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: diff --git a/WindowsAppRuntime.sln b/WindowsAppRuntime.sln index afe7629998..c2d87cf406 100644 --- a/WindowsAppRuntime.sln +++ b/WindowsAppRuntime.sln @@ -446,8 +446,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VersionInfoTests", "test\Ve {9C1A6C58-52D6-4514-9120-5C339C5DF4BE} = {9C1A6C58-52D6-4514-9120-5C339C5DF4BE} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FrameworkUdk.PackageReference", "eng\PackageReference\FrameworkUdk\Microsoft.FrameworkUdk.PackageReference.csproj", "{FD0CC14A-ED4B-4936-B68B-F31E58372E32}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager", "PackageManager", "{380C8BE1-1868-4860-BD32-ADCD8683285D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{CC969A0B-9B01-479D-A563-C9866BCC6F83}" @@ -529,6 +527,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager.Test.M.White EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager.Test.M.White.msix", "test\PackageManager\data\PackageManager.Test.M.White.msix\PackageManager.Test.M.White.msix.vcxproj", "{28DCF9CE-D9F4-4A7D-8AD1-F2EFC0D3B4DF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{8F5A44EF-D182-49C9-9BE9-7549CFE38A7F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageReference", "PackageReference", "{5C88AE1D-AC20-4A41-9299-1EEA15B80724}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FrameworkUdk", "FrameworkUdk", "{E24C263A-DE3E-4844-BA50-842DA5AD7A49}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FrameworkUdk.PackageReference", "eng\PackageReference\FrameworkUdk\Microsoft.FrameworkUdk.PackageReference.csproj", "{D5958784-4518-44F1-A518-80514B380ED5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IXP", "IXP", "{7B323048-439F-47E9-A3D4-7342C5ADE2A5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IXP.TransportPackage.PackageReference", "eng\PackageReference\IXP\IXP.TransportPackage.PackageReference.csproj", "{A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1663,22 +1673,6 @@ Global {442FB943-1197-48FE-B3B6-8C1BCA1E81E4}.Release|x64.Build.0 = Release|x64 {442FB943-1197-48FE-B3B6-8C1BCA1E81E4}.Release|x86.ActiveCfg = Release|Win32 {442FB943-1197-48FE-B3B6-8C1BCA1E81E4}.Release|x86.Build.0 = Release|Win32 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|ARM64.ActiveCfg = Debug|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|ARM64.Build.0 = Debug|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|x64.ActiveCfg = Debug|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|x64.Build.0 = Debug|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|x86.ActiveCfg = Debug|Any CPU - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Debug|x86.Build.0 = Debug|Any CPU - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|Any CPU.Build.0 = Release|Any CPU - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|ARM64.ActiveCfg = Release|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|ARM64.Build.0 = Release|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|x64.ActiveCfg = Release|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|x64.Build.0 = Release|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|x86.ActiveCfg = Release|x64 - {FD0CC14A-ED4B-4936-B68B-F31E58372E32}.Release|x86.Build.0 = Release|x64 {4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|Any CPU.ActiveCfg = Debug|x64 {4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|Any CPU.Build.0 = Debug|x64 {4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|ARM64.ActiveCfg = Debug|ARM64 @@ -1871,6 +1865,38 @@ Global {28DCF9CE-D9F4-4A7D-8AD1-F2EFC0D3B4DF}.Release|x64.Build.0 = Release|x64 {28DCF9CE-D9F4-4A7D-8AD1-F2EFC0D3B4DF}.Release|x86.ActiveCfg = Release|Win32 {28DCF9CE-D9F4-4A7D-8AD1-F2EFC0D3B4DF}.Release|x86.Build.0 = Release|Win32 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|Any CPU.ActiveCfg = Debug|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|Any CPU.Build.0 = Debug|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|ARM64.ActiveCfg = Debug|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|ARM64.Build.0 = Debug|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|x64.ActiveCfg = Debug|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|x64.Build.0 = Debug|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|x86.ActiveCfg = Debug|x86 + {D5958784-4518-44F1-A518-80514B380ED5}.Debug|x86.Build.0 = Debug|x86 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|Any CPU.ActiveCfg = Release|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|Any CPU.Build.0 = Release|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|ARM64.ActiveCfg = Release|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|ARM64.Build.0 = Release|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|x64.ActiveCfg = Release|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|x64.Build.0 = Release|x64 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|x86.ActiveCfg = Release|x86 + {D5958784-4518-44F1-A518-80514B380ED5}.Release|x86.Build.0 = Release|x86 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|Any CPU.Build.0 = Debug|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|ARM64.ActiveCfg = Debug|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|ARM64.Build.0 = Debug|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|x64.ActiveCfg = Debug|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|x64.Build.0 = Debug|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|x86.ActiveCfg = Debug|x86 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Debug|x86.Build.0 = Debug|x86 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|Any CPU.ActiveCfg = Release|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|Any CPU.Build.0 = Release|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|ARM64.ActiveCfg = Release|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|ARM64.Build.0 = Release|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|x64.ActiveCfg = Release|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|x64.Build.0 = Release|x64 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|x86.ActiveCfg = Release|x86 + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2033,6 +2059,11 @@ Global {7C240089-0F22-4247-9C91-51255C8DC18B} = {6213B1A3-E854-498F-AAFA-4CFC1E71023E} {AC79B8FF-4C27-4326-AD20-BBC70059FF51} = {7C240089-0F22-4247-9C91-51255C8DC18B} {28DCF9CE-D9F4-4A7D-8AD1-F2EFC0D3B4DF} = {6759ECC6-9381-4172-89E6-853F81A03D28} + {5C88AE1D-AC20-4A41-9299-1EEA15B80724} = {8F5A44EF-D182-49C9-9BE9-7549CFE38A7F} + {E24C263A-DE3E-4844-BA50-842DA5AD7A49} = {5C88AE1D-AC20-4A41-9299-1EEA15B80724} + {D5958784-4518-44F1-A518-80514B380ED5} = {E24C263A-DE3E-4844-BA50-842DA5AD7A49} + {7B323048-439F-47E9-A3D4-7342C5ADE2A5} = {5C88AE1D-AC20-4A41-9299-1EEA15B80724} + {A949149D-29CA-4AA7-B1ED-0E571B4AD9BB} = {7B323048-439F-47E9-A3D4-7342C5ADE2A5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4B3D7591-CFEC-4762-9A07-ABE99938FB77} diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml index 7030664d94..dc66898743 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml @@ -143,6 +143,9 @@ steps: Write-Host "Get-WinSystemLocale" Get-WinSystemLocale + Write-Host "WhoAmI" + Write-Host (whoami /user /groups /priv) + - task: PowerShell@2 displayName: 'Run TAEF Tests' inputs: diff --git a/dev/ApplicationData/M.W.S.ApplicationData.cpp b/dev/ApplicationData/M.W.S.ApplicationData.cpp index 8556f94497..89ecdecb0d 100644 --- a/dev/ApplicationData/M.W.S.ApplicationData.cpp +++ b/dev/ApplicationData/M.W.S.ApplicationData.cpp @@ -92,7 +92,7 @@ namespace winrt::Microsoft::Windows::Storage::implementation throw; } } - winrt::Microsoft::Windows::Storage::ApplicationData ApplicationData::GetForUnpackaged(hstring const& publisher, hstring const& product) + winrt::Microsoft::Windows::Storage::ApplicationData ApplicationData::GetForUnpackaged(hstring const& /*publisher*/, hstring const& /*product*/) { // TODO implement GetForUnpackaged throw hresult_not_implemented(); diff --git a/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.cpp b/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.cpp index 23dc2c087d..cc3f5db56b 100644 --- a/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.cpp +++ b/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.cpp @@ -429,7 +429,17 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation const double c_progressPercentageStartOfIsReady{ 0.01 }; packageDeploymentProgress.Progress = c_progressPercentageStartOfIsReady; progress(packageDeploymentProgress); - if (IsPackageSetReady(packageSet)) + bool isReady{}; + if (options.RegisterNewerIfAvailable()) + { + THROW_HR_IF_MSG(E_NOTIMPL, !IsPackageDeploymentFeatureSupported(winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentFeature::IsPackageReadyOrNewerAvailable), "RegisterNewerIfAvailable is not supported on this system"); + isReady = (IsPackageSetReadyOrNewerAvailable(packageSet) == winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::Ready); + } + else + { + isReady = IsPackageSetReady(packageSet); + } + if (isReady) { co_return winrt::make(PackageDeploymentStatus::CompletedSuccess, winrt::guid{}); } @@ -1222,7 +1232,7 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation catch (...) { const auto exception{ hresult_error(to_hresult(), take_ownership_from_abi) }; - error = LOG_HR_MSG(exception.code(), "ExtendedError:0x%08X PackageFamilyName:%ls PackageUri:%ls", + error = LOG_HR_MSG(exception.code(), "ExtendedError:0x%08X PackageFullName:%ls PackageUri:%ls", extendedError, packageFullName, packageUriAsString.c_str()); } if (FAILED(error)) @@ -1392,7 +1402,7 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation catch (...) { const auto exception{ hresult_error(to_hresult(), take_ownership_from_abi) }; - error = LOG_HR_MSG(exception.code(), "ExtendedError:0x%08X PackageFamilyName:%ls PackageUri:%ls", + error = LOG_HR_MSG(exception.code(), "ExtendedError:0x%08X PackageFullName:%ls PackageUri:%ls", extendedError, packageFullName, packageUriAsString.c_str()); } if (FAILED(error)) @@ -1612,7 +1622,7 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation } winrt::Windows::Foundation::IAsyncOperationWithProgress - PackageDeploymentManager::RegisterPackageByPackageFamilyNameAsync(winrt::hstring const& packageFamilyName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options) + PackageDeploymentManager::RegisterPackageByPackageFamilyNameAsync(const winrt::hstring packageFamilyName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options) { auto logTelemetry{ PackageManagementTelemetry::RegisterPackageByPackageFamilyNameAsync::Start(packageFamilyName) }; @@ -1660,7 +1670,7 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation } winrt::Windows::Foundation::IAsyncOperationWithProgress - PackageDeploymentManager::RegisterPackageByPackageFullNameAsync(winrt::hstring const& packageFullName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options) + PackageDeploymentManager::RegisterPackageByPackageFullNameAsync(const winrt::hstring packageFullName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options) { auto logTelemetry{ PackageManagementTelemetry::RegisterPackageByPackageFullNameAsync::Start(packageFullName) }; @@ -1892,7 +1902,17 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation errorText.clear(); activityId = winrt::guid{}; - if (IsReady(packageSetItem)) + bool isReady{}; + if (options.RegisterNewerIfAvailable()) + { + // Our caller already verified PackageDeploymentFeature::IsPackageReadyOrNewerAvailable is supported so no need to check again + isReady = (IsReadyOrNewerAvailable(packageSetItem) == winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::Ready); + } + else + { + isReady = IsReady(packageSetItem); + } + if (isReady) { return S_OK; } diff --git a/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.h b/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.h index 4c8cb0f4ba..35a997a7d0 100644 --- a/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.h +++ b/dev/PackageManager/API/M.W.M.D.PackageDeploymentManager.h @@ -60,8 +60,8 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation private: winrt::Windows::Foundation::IAsyncOperationWithProgress AddPackageByAppInstallerFileAsync(winrt::Windows::Foundation::Uri packageUri, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options); - winrt::Windows::Foundation::IAsyncOperationWithProgress RegisterPackageByPackageFamilyNameAsync(winrt::hstring const& packageFamilyName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options); - winrt::Windows::Foundation::IAsyncOperationWithProgress RegisterPackageByPackageFullNameAsync(winrt::hstring const& packageFullName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options); + winrt::Windows::Foundation::IAsyncOperationWithProgress RegisterPackageByPackageFamilyNameAsync(const winrt::hstring packageFamilyName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options); + winrt::Windows::Foundation::IAsyncOperationWithProgress RegisterPackageByPackageFullNameAsync(const winrt::hstring packageFullName, winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions options); private: winrt::hstring GetUupProductIdIfMsUup(winrt::Windows::Foundation::Uri const& uri) const; diff --git a/dev/PackageManager/API/M.W.M.D.PackageRuntimeManager.cpp b/dev/PackageManager/API/M.W.M.D.PackageRuntimeManager.cpp index f565ddf8d5..2ee35c6e03 100644 --- a/dev/PackageManager/API/M.W.M.D.PackageRuntimeManager.cpp +++ b/dev/PackageManager/API/M.W.M.D.PackageRuntimeManager.cpp @@ -103,12 +103,12 @@ namespace winrt::Microsoft::Windows::Management::Deployment::implementation THROW_HR_IF_NULL_MSG(E_INVALIDARG, packageUri, "PackageUri:"); } - void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& options) const + void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& /*options*/ ) const { // Nothing to do! } - void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& options) const + void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& /*options*/) const { // Nothing to do! } diff --git a/dev/Projections/CS/Microsoft.Windows.AppLifecycle/Microsoft.Windows.AppLifecycle.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.AppLifecycle/Microsoft.Windows.AppLifecycle.Projection.csproj index f83fb46e61..7ca82f4c54 100644 --- a/dev/Projections/CS/Microsoft.Windows.AppLifecycle/Microsoft.Windows.AppLifecycle.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.AppLifecycle/Microsoft.Windows.AppLifecycle.Projection.csproj @@ -1,4 +1,4 @@ - + net6.0-windows10.0.17763.0 10.0.17763.0 @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.AppNotifications.Builder.Projection/Microsoft.Windows.AppNotifications.Builder.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.AppNotifications.Builder.Projection/Microsoft.Windows.AppNotifications.Builder.Projection.csproj index e47312bb8b..db3f7466a6 100644 --- a/dev/Projections/CS/Microsoft.Windows.AppNotifications.Builder.Projection/Microsoft.Windows.AppNotifications.Builder.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.AppNotifications.Builder.Projection/Microsoft.Windows.AppNotifications.Builder.Projection.csproj @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.AppNotifications.Projection/Microsoft.Windows.AppNotifications.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.AppNotifications.Projection/Microsoft.Windows.AppNotifications.Projection.csproj index 2a7b61f17f..d09b623c84 100644 --- a/dev/Projections/CS/Microsoft.Windows.AppNotifications.Projection/Microsoft.Windows.AppNotifications.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.AppNotifications.Projection/Microsoft.Windows.AppNotifications.Projection.csproj @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.ApplicationModel.DynamicDependency/Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.ApplicationModel.DynamicDependency/Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.csproj index 5e7f349a1c..d66195b574 100644 --- a/dev/Projections/CS/Microsoft.Windows.ApplicationModel.DynamicDependency/Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.ApplicationModel.DynamicDependency/Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.csproj @@ -1,4 +1,4 @@ - + net6.0-windows10.0.17763.0 10.0.17763.0 @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.ApplicationModel.WindowsAppRuntime/Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.ApplicationModel.WindowsAppRuntime/Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.csproj index 822b7be21f..b2de626a21 100644 --- a/dev/Projections/CS/Microsoft.Windows.ApplicationModel.WindowsAppRuntime/Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.ApplicationModel.WindowsAppRuntime/Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.csproj @@ -1,4 +1,4 @@ - + net6.0-windows10.0.17763.0 10.0.17763.0 @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.Management.Deployment.Projection/Microsoft.Windows.Management.Deployment.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.Management.Deployment.Projection/Microsoft.Windows.Management.Deployment.Projection.csproj index 9703469031..e5a6919456 100644 --- a/dev/Projections/CS/Microsoft.Windows.Management.Deployment.Projection/Microsoft.Windows.Management.Deployment.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.Management.Deployment.Projection/Microsoft.Windows.Management.Deployment.Projection.csproj @@ -1,4 +1,4 @@ - + net6.0-windows10.0.17763.0 10.0.17763.0 @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.PushNotifications.Projection/Microsoft.Windows.PushNotifications.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.PushNotifications.Projection/Microsoft.Windows.PushNotifications.Projection.csproj index 436fc92cfe..d60f171859 100644 --- a/dev/Projections/CS/Microsoft.Windows.PushNotifications.Projection/Microsoft.Windows.PushNotifications.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.PushNotifications.Projection/Microsoft.Windows.PushNotifications.Projection.csproj @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj index 42e8a63b36..094a0b8c7b 100644 --- a/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.Storage.Projection/Microsoft.Windows.Storage.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.Storage.Projection/Microsoft.Windows.Storage.Projection.csproj index df2773f8b4..d925774b2e 100644 --- a/dev/Projections/CS/Microsoft.Windows.Storage.Projection/Microsoft.Windows.Storage.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.Storage.Projection/Microsoft.Windows.Storage.Projection.csproj @@ -1,4 +1,4 @@ - + net6.0-windows10.0.17763.0 10.0.17763.0 @@ -12,6 +12,11 @@ true + + + 8305 + + all @@ -54,5 +59,4 @@ true - diff --git a/dev/Projections/CS/Microsoft.Windows.System.Power/Microsoft.Windows.System.Power.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.System.Power/Microsoft.Windows.System.Power.Projection.csproj index 7761eaa539..7abf95eb47 100644 --- a/dev/Projections/CS/Microsoft.Windows.System.Power/Microsoft.Windows.System.Power.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.System.Power/Microsoft.Windows.System.Power.Projection.csproj @@ -1,4 +1,4 @@ - + net6.0-windows10.0.17763.0 10.0.17763.0 @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/Projections/CS/Microsoft.Windows.System/Microsoft.Windows.System.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.System/Microsoft.Windows.System.Projection.csproj index 70cf5b201f..c304d4d681 100644 --- a/dev/Projections/CS/Microsoft.Windows.System/Microsoft.Windows.System.Projection.csproj +++ b/dev/Projections/CS/Microsoft.Windows.System/Microsoft.Windows.System.Projection.csproj @@ -12,6 +12,11 @@ true + + + 8305 + + all diff --git a/dev/WindowsAppRuntime_DLL/packages.config b/dev/WindowsAppRuntime_DLL/packages.config index 84e01cd131..a58a57cdf3 100644 --- a/dev/WindowsAppRuntime_DLL/packages.config +++ b/dev/WindowsAppRuntime_DLL/packages.config @@ -5,5 +5,5 @@ - + diff --git a/eng/PackageReference/IXP/IXP.TransportPackage.PackageReference.csproj b/eng/PackageReference/IXP/IXP.TransportPackage.PackageReference.csproj new file mode 100644 index 0000000000..3594a47954 --- /dev/null +++ b/eng/PackageReference/IXP/IXP.TransportPackage.PackageReference.csproj @@ -0,0 +1,21 @@ + + + + net6.0 + net6.0-windows10.0.19041.0 + x64;x86 + AnyCPU + + Copyright (c) Microsoft Corporation. All rights reserved. + IXP.TransportPackage.PackageReference + + + + + false + + + + + + diff --git a/eng/Version.Dependencies.props b/eng/Version.Dependencies.props index ab7541e542..b5789e71cf 100644 --- a/eng/Version.Dependencies.props +++ b/eng/Version.Dependencies.props @@ -11,6 +11,7 @@ $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="CsWinRT.Dependency.DotNetCoreSdk"\s+Version="(.*?)"').Groups[1].Value) $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="CsWinRT.Dependency.WindowsSdkVersionSuffix"\s+Version="(.*?)"').Groups[1].Value) $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="Microsoft.FrameworkUdk"\s+Version="(.*?)"').Groups[1].Value) + $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage"\s+Version="(.*?)"').Groups[1].Value) $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="Microsoft.WinAppSDK.EngCommon"\s+Version="(.*?)"').Groups[1].Value) $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="Microsoft.WindowsAppSDK.AppLicensingInternal.TransportPackage"\s+Version="(.*?)"').Groups[1].Value) $([System.Text.RegularExpressions.Regex]::Match($(VersionDetailsXml), 'Name="Microsoft.Windows.CsWinRT"\s+Version="(.*?)"').Groups[1].Value) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f034057f25..6addc5dd01 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -35,6 +35,10 @@ https://dev.azure.com/microsoft/ProjectReunion/_git/WindowsAppSDKClosed b52174b1bb7916451fee250ccec1cd2bfb3e86e1 + + https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP + 314a6405281bfa28af6bf373bc8bfb2ab98d4fd3 + diff --git a/test/ApplicationData/ApplicationDataTests.cpp b/test/ApplicationData/ApplicationDataTests.cpp index d5bcf6ec3c..a07bc2ef39 100644 --- a/test/ApplicationData/ApplicationDataTests.cpp +++ b/test/ApplicationData/ApplicationDataTests.cpp @@ -5,109 +5,24 @@ #include +namespace TD = ::Test::Diagnostics; namespace TB = ::Test::Bootstrap; namespace TP = ::Test::Packages; static const winrt::hstring null_hstring; -namespace WEX::TestExecution -{ - // Teach TAEF how to format a winrt::hstring - template <> - class VerifyOutputTraits - { - public: - static WEX::Common::NoThrowString ToString(winrt::hstring const& value) - { - const auto s{ value.c_str() }; - if (!s) - { - return WEX::Common::NoThrowString(L"nullptr"); - } - else - { - return WEX::Common::NoThrowString().Format(L"\"%s\"", s); - } - } - }; - - // Teach TAEF how to compare a winrt::hstring - template <> - class VerifyCompareTraits - { - public: - static bool AreEqual(winrt::hstring const& expected, winrt::hstring const& actual) - { - return Compare(expected, actual) == 0; - } - - static bool AreSame(winrt::hstring const& expected, winrt::hstring const& actual) - { - return &expected == &actual; - } - - static bool IsLessThan(winrt::hstring const& expectedLess, winrt::hstring const& expectedGreater) - { - return Compare(expectedLess, expectedGreater) < 0; - } - - static bool IsGreaterThan(winrt::hstring const& expectedGreater, winrt::hstring const& expectedLess) - { - return Compare(expectedGreater, expectedLess) > 0; - } - - static bool IsNull(winrt::hstring const& object) - { - return object.c_str() == nullptr; - } - private: - static int Compare(winrt::hstring const& left, winrt::hstring const& right) - { - if (left == right) - { - return 0; - } - else if (left.c_str() == nullptr) - { - return -1; - } - else if (right.c_str() == nullptr) - { - return 1; - } - else - { - return CompareStringOrdinal(left .c_str(), -1, right.c_str(), -1, FALSE) - CSTR_EQUAL; - } - } - }; -} - -namespace Test::PackageManager::Tests +namespace Test::ApplicationData::Tests { const auto Main_PackageFamilyName{ ::TP::DynamicDependencyDataStore::c_PackageFamilyName }; const auto Framework_PackageFamilyName{ ::TP::WindowsAppRuntimeFramework::c_PackageFamilyName }; - std::filesystem::path GetExpectedMachinePath(winrt::hstring const& packageFamilyName) - { - // Expected Path = HKLM\...apprepository...\Families\ApplicationData\...pkgfamilyname...\Machine - // This is typically %ProgramData%\Microsoft\Windows\AppRepository\Families\ApplicationData\...pkgfamilyname...\Machine - // and by 'typically' we mean 'all current Windows editions' so we'll assume it's true for ease of testing - // and use this test as a canary to detect if/when this is ever not true on any supported platform. - wil::unique_cotaskmem_string path; - THROW_IF_FAILED(::SHGetKnownFolderPath(FOLDERID_ProgramData, 0, nullptr, wil::out_param(path))); - const std::filesystem::path programData{ path.get() }; - const auto packageRepositoryRoot{ programData / L"Microsoft\\Windows\\AppRepository\\Families\\ApplicationData" }; - const auto packageFamilyRoot{ packageRepositoryRoot / packageFamilyName.c_str() }; - const auto expectedMachinePath{ packageFamilyRoot / L"Machine" }; - return expectedMachinePath; - } - class ApplicationDataTests { public: BEGIN_TEST_CLASS(ApplicationDataTests) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") + TEST_CLASS_PROPERTY(L"RunAs", L"RestrictedUser") END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -117,6 +32,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires Win11 >= 21H2 (SV1). Skipping tests"); return true; } + + ::TD::DumpExecutionContext(); + ::TB::Setup(); return true; } @@ -436,7 +354,7 @@ namespace Test::PackageManager::Tests container.Close(); try { - auto locality{ container.Locality() }; + [[maybe_unused]] auto locality{ container.Locality() }; VERIFY_FAIL(L"Success is not expected"); } catch (winrt::hresult_error& e) @@ -447,7 +365,7 @@ namespace Test::PackageManager::Tests systemContainer.Close(); try { - auto locality{ systemContainer.Locality() }; + [[maybe_unused]] auto locality{ systemContainer.Locality() }; VERIFY_FAIL(L"Success is not expected"); } catch (winrt::hresult_error& e) @@ -465,7 +383,7 @@ namespace Test::PackageManager::Tests localSettings.Close(); try { - auto locality{ localSettings.Locality() }; + [[maybe_unused]] auto locality{ localSettings.Locality() }; VERIFY_FAIL(L"Success is not expected"); } catch (winrt::hresult_error& e) @@ -476,7 +394,7 @@ namespace Test::PackageManager::Tests systemLocalSettings.Close(); try { - auto locality{ systemLocalSettings.Locality() }; + [[maybe_unused]] auto locality{ systemLocalSettings.Locality() }; VERIFY_FAIL(L"Success is not expected"); } catch (winrt::hresult_error& e) @@ -534,147 +452,4 @@ namespace Test::PackageManager::Tests //TODO } }; - - - class ApplicationDataTests_Elevated - { - public: - BEGIN_TEST_CLASS(ApplicationDataTests_Elevated) - TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") - TEST_CLASS_PROPERTY(L"RunAs", L"RestrictedUser") - TEST_CLASS_PROPERTY(L"RunFixtureAs", L"RestrictedUser") - END_TEST_CLASS() - - TEST_CLASS_SETUP(ClassSetup) - { - if (!::WindowsVersion::IsWindows11_21H2OrGreater()) - { - WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires Win11 >= 21H2 (SV1). Skipping tests"); - return true; - } - ::TB::Setup(); - return true; - } - - TEST_CLASS_CLEANUP(ClassCleanup) - { - ::TB::Cleanup(); - return true; - } - - static void CreateMachinePathIfNecessary(PCWSTR packageFamilyName) - { - const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; - const std::filesystem::path path{ expectedMachinePath.c_str() }; - VERIFY_ARE_EQUAL(path.filename(), L"Machine"); - if (std::filesystem::exists(path)) - { - WEX::Logging::Log::Comment(WEX::Common::String().Format(L"MachinePath exists: %s", path.c_str())); - } - else - { - WEX::Logging::Log::Comment(WEX::Common::String().Format(L"Creating MachinePath: %s", path.c_str())); - wil::CreateDirectoryDeep(path.c_str()); - } - } - - static void RemoveMachinePathIfNecessary(PCWSTR packageFamilyName) - { - const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; - const std::filesystem::path path{ expectedMachinePath.c_str() }; - VERIFY_ARE_EQUAL(path.filename(), L"Machine"); - const auto packageFamilyPath{ path.parent_path() }; - if (std::filesystem::exists(packageFamilyPath)) - { - WEX::Logging::Log::Comment(WEX::Common::String().Format(L"Removing MachinePath's PackageFamily: %s", packageFamilyPath.c_str())); - wil::RemoveDirectoryRecursive(packageFamilyPath.c_str(), wil::RemoveDirectoryOptions::RemoveReadOnly); - } - else - { - WEX::Logging::Log::Comment(WEX::Common::String().Format(L"MachinePath's PackageFamily does not exist: %s", packageFamilyPath.c_str())); - } - } - - TEST_METHOD(CreateMachinePathIfNecessary_Framework) - { - BEGIN_TEST_METHOD_PROPERTIES() - TEST_METHOD_PROPERTY(L"RunAs", L"System") - END_TEST_METHOD_PROPERTIES() - - const auto packageFamilyName{ Framework_PackageFamilyName }; - CreateMachinePathIfNecessary(packageFamilyName); - } - - TEST_METHOD(CreateMachinePathIfNecessary_Main) - { - BEGIN_TEST_METHOD_PROPERTIES() - TEST_METHOD_PROPERTY(L"RunAs", L"System") - END_TEST_METHOD_PROPERTIES() - - const auto packageFamilyName{ Main_PackageFamilyName }; - CreateMachinePathIfNecessary(packageFamilyName); - } - - TEST_METHOD(MachineFolderAndPath_Main_Supported) - { - BEGIN_TEST_METHOD_PROPERTIES() - TEST_METHOD_PROPERTY(L"RunAs", L"RestrictedUser") - END_TEST_METHOD_PROPERTIES() - - winrt::hstring packageFamilyName{ Main_PackageFamilyName }; - auto applicationData{ winrt::Microsoft::Windows::Storage::ApplicationData::GetForPackageFamily(packageFamilyName) }; - VERIFY_IS_NOT_NULL(applicationData); - - VERIFY_IS_TRUE(applicationData.IsMachinePathSupported()); - - const auto machineFolder{ applicationData.MachineFolder() }; - VERIFY_IS_NOT_NULL(machineFolder); - const auto machinePath{ applicationData.MachinePath() }; - VERIFY_ARE_EQUAL(machineFolder.Path(), machinePath); - - const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; - VERIFY_ARE_EQUAL(machinePath, winrt::hstring(expectedMachinePath.c_str())); - } - - TEST_METHOD(MachineFolderAndPath_Framework_Supported) - { - BEGIN_TEST_METHOD_PROPERTIES() - TEST_METHOD_PROPERTY(L"RunAs", L"RestrictedUser") - END_TEST_METHOD_PROPERTIES() - - winrt::hstring packageFamilyName{ Framework_PackageFamilyName }; - auto applicationData{ winrt::Microsoft::Windows::Storage::ApplicationData::GetForPackageFamily(packageFamilyName) }; - VERIFY_IS_NOT_NULL(applicationData); - - VERIFY_IS_TRUE(applicationData.IsMachinePathSupported()); - - const auto machineFolder{ applicationData.MachineFolder() }; - VERIFY_IS_NOT_NULL(machineFolder); - const auto machinePath{ applicationData.MachinePath() }; - VERIFY_ARE_EQUAL(machineFolder.Path(), machinePath); - - const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; - VERIFY_ARE_EQUAL(machinePath, winrt::hstring(expectedMachinePath.c_str())); - } - - TEST_METHOD(RemoveMachinePathIfNecessary_Main) - { - BEGIN_TEST_METHOD_PROPERTIES() - TEST_METHOD_PROPERTY(L"RunAs", L"System") - END_TEST_METHOD_PROPERTIES() - - const auto packageFamilyName{ Main_PackageFamilyName }; - RemoveMachinePathIfNecessary(packageFamilyName); - } - - TEST_METHOD(RemoveMachinePathIfNecessary_Framework) - { - BEGIN_TEST_METHOD_PROPERTIES() - TEST_METHOD_PROPERTY(L"RunAs", L"System") - END_TEST_METHOD_PROPERTIES() - - const auto packageFamilyName{ Framework_PackageFamilyName }; - RemoveMachinePathIfNecessary(packageFamilyName); - } - }; } diff --git a/test/ApplicationData/ApplicationDataTests.vcxproj b/test/ApplicationData/ApplicationDataTests.vcxproj index 25bf3cba4a..fbe4a19a66 100644 --- a/test/ApplicationData/ApplicationDataTests.vcxproj +++ b/test/ApplicationData/ApplicationDataTests.vcxproj @@ -110,6 +110,8 @@ Create + + diff --git a/test/ApplicationData/ApplicationDataTests.vcxproj.filters b/test/ApplicationData/ApplicationDataTests.vcxproj.filters index 889fd37b8a..393dcf3001 100644 --- a/test/ApplicationData/ApplicationDataTests.vcxproj.filters +++ b/test/ApplicationData/ApplicationDataTests.vcxproj.filters @@ -21,6 +21,12 @@ Source Files + + Source Files + + + Source Files + diff --git a/test/ApplicationData/ApplicationDataTests_Elevated.cpp b/test/ApplicationData/ApplicationDataTests_Elevated.cpp new file mode 100644 index 0000000000..5e69cc4db1 --- /dev/null +++ b/test/ApplicationData/ApplicationDataTests_Elevated.cpp @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +#include "pch.h" + +#include + +namespace TD = ::Test::Diagnostics; +namespace TB = ::Test::Bootstrap; +namespace TP = ::Test::Packages; + +namespace Test::ApplicationData::Tests +{ + const auto Main_PackageFamilyName{ ::TP::DynamicDependencyDataStore::c_PackageFamilyName }; + const auto Framework_PackageFamilyName{ ::TP::WindowsAppRuntimeFramework::c_PackageFamilyName }; + + inline std::filesystem::path GetExpectedMachinePath(winrt::hstring const& packageFamilyName) + { + // Expected Path = HKLM\...apprepository...\Families\ApplicationData\...pkgfamilyname...\Machine + // This is typically %ProgramData%\Microsoft\Windows\AppRepository\Families\ApplicationData\...pkgfamilyname...\Machine + // and by 'typically' we mean 'all current Windows editions' so we'll assume it's true for ease of testing + // and use this test as a canary to detect if/when this is ever not true on any supported platform. + wil::unique_cotaskmem_string path; + THROW_IF_FAILED(::SHGetKnownFolderPath(FOLDERID_ProgramData, 0, nullptr, wil::out_param(path))); + const std::filesystem::path programData{ path.get() }; + const auto packageRepositoryRoot{ programData / L"Microsoft\\Windows\\AppRepository\\Families\\ApplicationData" }; + const auto packageFamilyRoot{ packageRepositoryRoot / packageFamilyName.c_str() }; + const auto expectedMachinePath{ packageFamilyRoot / L"Machine" }; + return expectedMachinePath; + } + + class ApplicationDataTests_Elevated + { + public: + BEGIN_TEST_CLASS(ApplicationDataTests_Elevated) + TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") + TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_CLASS_PROPERTY(L"RunFixtureAs", L"System") + END_TEST_CLASS() + + TEST_CLASS_SETUP(ClassSetup) + { + if (!::WindowsVersion::IsWindows11_21H2OrGreater()) + { + WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires Win11 >= 21H2 (SV1). Skipping tests"); + return true; + } + + ::TD::DumpExecutionContext(); + + CreateMachinePathIfNecessary(Framework_PackageFamilyName); + CreateMachinePathIfNecessary(Main_PackageFamilyName); + return true; + } + + TEST_CLASS_CLEANUP(ClassCleanup) + { + RemoveMachinePathIfNecessary(Main_PackageFamilyName); + RemoveMachinePathIfNecessary(Framework_PackageFamilyName); + return true; + } + + static void CreateMachinePathIfNecessary(PCWSTR packageFamilyName) + { + const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; + const std::filesystem::path path{ expectedMachinePath.c_str() }; + VERIFY_ARE_EQUAL(path.filename(), L"Machine"); + if (std::filesystem::exists(path)) + { + WEX::Logging::Log::Comment(WEX::Common::String().Format(L"MachinePath exists: %s", path.c_str())); + } + else + { + WEX::Logging::Log::Comment(WEX::Common::String().Format(L"Creating MachinePath: %s", path.c_str())); + wil::CreateDirectoryDeep(path.c_str()); + } + } + + static void RemoveMachinePathIfNecessary(PCWSTR packageFamilyName) + { + const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; + const std::filesystem::path path{ expectedMachinePath.c_str() }; + VERIFY_ARE_EQUAL(path.filename(), L"Machine"); + const auto packageFamilyPath{ path.parent_path() }; + if (std::filesystem::exists(packageFamilyPath)) + { + WEX::Logging::Log::Comment(WEX::Common::String().Format(L"Removing MachinePath's PackageFamily: %s", packageFamilyPath.c_str())); + wil::RemoveDirectoryRecursive(packageFamilyPath.c_str(), wil::RemoveDirectoryOptions::RemoveReadOnly); + } + else + { + WEX::Logging::Log::Comment(WEX::Common::String().Format(L"MachinePath's PackageFamily does not exist: %s", packageFamilyPath.c_str())); + } + } + + TEST_METHOD(MachineFolderAndPath_Main_Supported) + { + ::TB::Setup(); + + winrt::hstring packageFamilyName{ Main_PackageFamilyName }; + auto applicationData{ winrt::Microsoft::Windows::Storage::ApplicationData::GetForPackageFamily(packageFamilyName) }; + VERIFY_IS_NOT_NULL(applicationData); + + VERIFY_IS_TRUE(applicationData.IsMachinePathSupported()); + + const auto machineFolder{ applicationData.MachineFolder() }; + VERIFY_IS_NOT_NULL(machineFolder); + const auto machinePath{ applicationData.MachinePath() }; + VERIFY_ARE_EQUAL(machineFolder.Path(), machinePath); + + const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; + VERIFY_ARE_EQUAL(machinePath, winrt::hstring(expectedMachinePath.c_str())); + + ::TB::Cleanup(); + } + + TEST_METHOD(MachineFolderAndPath_Framework_Supported) + { + ::TB::Setup(); + + winrt::hstring packageFamilyName{ Framework_PackageFamilyName }; + auto applicationData{ winrt::Microsoft::Windows::Storage::ApplicationData::GetForPackageFamily(packageFamilyName) }; + VERIFY_IS_NOT_NULL(applicationData); + + VERIFY_IS_TRUE(applicationData.IsMachinePathSupported()); + + const auto machineFolder{ applicationData.MachineFolder() }; + VERIFY_IS_NOT_NULL(machineFolder); + const auto machinePath{ applicationData.MachinePath() }; + VERIFY_ARE_EQUAL(machineFolder.Path(), machinePath); + + const auto expectedMachinePath{ GetExpectedMachinePath(packageFamilyName) }; + VERIFY_ARE_EQUAL(machinePath, winrt::hstring(expectedMachinePath.c_str())); + + ::TB::Cleanup(); + } + }; +} diff --git a/test/ApplicationData/ApplicationDataTests_Module.cpp b/test/ApplicationData/ApplicationDataTests_Module.cpp new file mode 100644 index 0000000000..d9df50685a --- /dev/null +++ b/test/ApplicationData/ApplicationDataTests_Module.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +#include "pch.h" + +//BEGIN_MODULE() +// MODULE_PROPERTY(L"IsolationLevel", L"Class") +//END_MODULE() diff --git a/test/ApplicationData/pch.h b/test/ApplicationData/pch.h index 2635f15b87..009cc61028 100644 --- a/test/ApplicationData/pch.h +++ b/test/ApplicationData/pch.h @@ -26,8 +26,10 @@ #include +#include #include #include #include +#include #endif //PCH_H diff --git a/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj b/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj new file mode 100644 index 0000000000..447d8ef33f --- /dev/null +++ b/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj @@ -0,0 +1,272 @@ + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + + + 17.0 + Win32Proj + {1daa2342-cf55-48e5-b49c-982fa5c07014} + CameraCaptureUITests + 10.0 + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + false + + + DynamicLibrary + false + v143 + Unicode + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;CAMERACAPTUREUITESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;CAMERACAPTUREUITESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;CAMERACAPTUREUITESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + + + Windows + true + false + + + + + Level3 + true + true + true + NDEBUG;CAMERACAPTUREUITESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + + + Windows + true + true + true + false + + + + + Level3 + true + NDEBUG;CAMERACAPTUREUITESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + + + Windows + true + false + + + + + Level3 + true + true + true + NDEBUG;CAMERACAPTUREUITESTS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + + + Windows + true + true + true + false + + + + + + + + + Create + Create + Create + Create + Create + Create + + + + + + + + + + + $(OutDir)\..\WindowsAppRuntime_DLL\Microsoft.Windows.Media.Capture.winmd + true + + + + + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + diff --git a/test/PackageManager/API/PackageDeploymentManagerTests.cpp b/test/PackageManager/API/PackageDeploymentManagerTests.cpp index 62b6ebf490..ffb44b1191 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -31,6 +32,8 @@ namespace Test::PackageManager::Tests return true; } + TD::DumpExecutionContext(); + ::TB::Setup(); return true; } diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Add.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Add.cpp index d0a342240e..1e4c75cf21 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Add.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Add.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Add) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -82,7 +86,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -189,7 +193,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageByUriAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -306,7 +310,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSetAsync_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -525,7 +529,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSetAsync_N_RegisteredAndNotInstalledAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); @@ -595,7 +599,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageAsync_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -619,7 +623,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageByUriAsync_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -642,7 +646,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSetAsync_1_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -669,7 +673,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSetAsync_N_RegisteredPackageStatusOkAndBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Framework.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Framework.cpp index 68840170de..bc9bd02b38 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Framework.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Framework.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Deprovision_Framework) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ TEST_CLASS_PROPERTY(L"RunFixtureAs", L"ElevatedUser") END_TEST_CLASS() @@ -37,6 +38,8 @@ namespace Test::PackageManager::Tests return true; } + TD::DumpExecutionContext(); + RemovePackage_Red(); AddPackage_Red(); ProvisionPackage_Red(); diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Main.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Main.cpp index dc07960162..0bc7516da2 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Main.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Deprovision_Main.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Deprovision_Main) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ TEST_CLASS_PROPERTY(L"RunFixtureAs", L"ElevatedUser") END_TEST_CLASS() @@ -39,6 +40,8 @@ namespace Test::PackageManager::Tests return true; } + TD::DumpExecutionContext(); + RemovePackage_Black(); AddPackage_Black(); ProvisionPackage_Black(); diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady.cpp index 04d22ab0af..21cf8a969e 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_EnsureReady) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -204,7 +208,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(EnsurePackageSetReadyAsync_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -423,7 +427,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(EnsurePackageSetReadyAsync_N_RegisteredAndNotInstalledAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); @@ -493,7 +497,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(EnsurePackageSetReadyAsync_1_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -520,7 +524,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(EnsurePackageSetReadyAsync_N_RegisteredPackageStatusOkAndBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable.cpp new file mode 100644 index 0000000000..36ac15930c --- /dev/null +++ b/test/PackageManager/API/PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable.cpp @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +#include "pch.h" + +#include "PackageDeploymentManagerTests.h" + +#include + +namespace TD = ::Test::Diagnostics; +namespace TB = ::Test::Bootstrap; +namespace TP = ::Test::Packages; +namespace TPF = ::Test::Packages::Framework; +namespace TPM = ::Test::Packages::Main; +namespace TPMT = ::Test::PackageManager::Tests; + +namespace Test::PackageManager::Tests +{ + class PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable : PackageDeploymentManagerTests_Base + { + public: + BEGIN_TEST_CLASS(PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable) + TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ + END_TEST_CLASS() + + TEST_CLASS_SETUP(ClassSetup) + { + if (!::WindowsVersion::IsWindows10_20H1OrGreater()) + { + WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); + return true; + } + + TD::DumpExecutionContext(); + + RemovePackage_Blue(); + RemovePackage_Green(); + RemovePackage_Redder(); + RemovePackage_Red(); + ::TB::Setup(); + + if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) + { + WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"IsPackageReadyOrNewerAvailable not supported. Skipping tests"); + return true; + } + + return true; + } + + TEST_CLASS_CLEANUP(ClassCleanup) + { + RemovePackage_Blue(); + RemovePackage_Green(); + RemovePackage_Redder(); + RemovePackage_Red(); + ::TB::Cleanup(); + return true; + } + + TEST_METHOD(EnsurePackageSetReadyAsync_InvalidParameter) + { + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + try + { + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentResult{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options).get() }; + VERIFY_FAIL(L"Success is not expected"); + } + catch (winrt::hresult_error& e) + { + VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); + } + + try + { + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"Does.Not.Exist" }; + packageSet.Id(c_packageSetId); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentResult{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options).get() }; + VERIFY_FAIL(L"Success is not expected"); + } + catch (winrt::hresult_error& e) + { + VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); + } + + try + { + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"Does.Not.Exist" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem packageSetItem; + packageSet.Items().Append(packageSetItem); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentResult{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options).get() }; + VERIFY_FAIL(L"Success is not expected"); + } + catch (winrt::hresult_error& e) + { + VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); + } + + try + { + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"Does.Not.Exist" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem packageSetItem; + PCWSTR c_packageFamilyName{ L"Not a valid Package Family Name" }; + packageSetItem.PackageFamilyName(c_packageFamilyName); + packageSet.Items().Append(packageSetItem); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentResult{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options).get() }; + VERIFY_FAIL(L"Success is not expected"); + } + catch (winrt::hresult_error& e) + { + VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); + } + + try + { + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"Does.Not.Exist" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem packageSetItem; + PCWSTR c_packageFamilyName{ L"Does.Not.Exist_1234567890abc" }; + packageSetItem.PackageFamilyName(c_packageFamilyName); + packageSet.Items().Append(packageSetItem); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentResult{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options).get() }; + VERIFY_FAIL(L"Success is not expected"); + } + catch (winrt::hresult_error& e) + { + VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); + } + + try + { + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"Does.Not.Exist" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem packageSetItem; + PCWSTR c_packageUriAsString{ L"file://c:/assemble.msix" }; + winrt::Windows::Foundation::Uri packageUri{ c_packageUriAsString }; + packageSetItem.PackageUri(packageUri); + packageSet.Items().Append(packageSetItem); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentResult{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options).get() }; + VERIFY_FAIL(L"Success is not expected"); + } + catch (winrt::hresult_error& e) + { + VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); + } + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_NoSuchPackage_Fail) + { + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"Does.Not.Exist" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem packageSetItem; + PCWSTR c_packageFamilyName{ L"Does.Not.Exist_1234567890abc" }; + packageSetItem.PackageFamilyName(c_packageFamilyName); + PCWSTR c_packageUriAsString{ L"file://c:/does/not/exist.msix" }; + winrt::Windows::Foundation::Uri packageUri{ c_packageUriAsString }; + packageSetItem.PackageUri(packageUri); + packageSet.Items().Append(packageSetItem); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentStatus::CompletedFailure, deploymentResult.Status()); + VERIFY_ARE_EQUAL(HRESULT_FROM_WIN32(ERROR_INSTALL_OPEN_PACKAGE_FAILED), deploymentResult.Error(), WEX::Common::String().Format(L"0x%X", deploymentResult.Error())); + VERIFY_ARE_EQUAL(HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), deploymentResult.ExtendedError(), WEX::Common::String().Format(L"0x%X", deploymentResult.ExtendedError())); + VERIFY_IS_FALSE(deploymentResult.ErrorText().empty(), WEX::Common::String().Format(L"%s", deploymentResult.ErrorText().c_str())); + + VERIFY_IS_FALSE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_NotInstalled_Success) + { + RemovePackageFamily_Red(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_Staged_Success) + { + BEGIN_TEST_METHOD_PROPERTIES() + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") + END_TEST_METHOD_PROPERTIES() + + StagePackage_Red(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_Registered_Success) + { + AddPackage_Red(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_OlderRegistered_Success) + { + AddPackage_Red(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem redder{ Make_PackageSetItem(::TPF::Redder::GetPackageFullName(), ::TPF::Redder::c_packageDirName) }; + packageSet.Items().Append(redder); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + + RemovePackage_Redder(); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_NewerRegistered_Success) + { + AddPackage_Redder(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + + RemovePackage_Redder(); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_NotInstalled_Success) + { + RemovePackageFamily_Red(); + RemovePackage_Green(); + RemovePackage_Blue(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem blue{ Make_PackageSetItem(::TPF::Blue::GetPackageFullName(), ::TPF::Blue::c_packageDirName) }; + packageSet.Items().Append(blue); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_Registered_Success) + { + AddPackage_Red(); + AddPackage_Green(); + AddPackage_Blue(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem blue{ Make_PackageSetItem(::TPF::Blue::GetPackageFullName(), ::TPF::Blue::c_packageDirName) }; + packageSet.Items().Append(blue); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_NewerRegistered_Success) + { + AddPackage_Redder(); + AddPackage_Green(); + AddPackage_Blue(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem blue{ Make_PackageSetItem(::TPF::Blue::GetPackageFullName(), ::TPF::Blue::c_packageDirName) }; + packageSet.Items().Append(blue); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + + RemovePackage_Redder(); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_OlderRegistered_Success) + { + AddPackage_Red(); + AddPackage_Green(); + AddPackage_Blue(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem redder{ Make_PackageSetItem(::TPF::Redder::GetPackageFullName(), ::TPF::Redder::c_packageDirName) }; + packageSet.Items().Append(redder); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem blue{ Make_PackageSetItem(::TPF::Blue::GetPackageFullName(), ::TPF::Blue::c_packageDirName) }; + packageSet.Items().Append(blue); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + + RemovePackage_Redder(); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_RegisteredAndNotInstalled_Success) + { + AddPackage_Red(); + RemovePackage_Green(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_RegisteredAndNotInstalledAndStaged_Success) + { + BEGIN_TEST_METHOD_PROPERTIES() + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") + END_TEST_METHOD_PROPERTIES() + + AddPackage_Red(); + RemovePackage_Green(); + StagePackage_Blue(); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem blue{ Make_PackageSetItem(::TPF::Blue::GetPackageFullName(), ::TPF::Blue::c_packageDirName) }; + packageSet.Items().Append(blue); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + }; + + class PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable_Elevated : PackageDeploymentManagerTests_Base + { + public: + BEGIN_TEST_CLASS(PackageDeploymentManagerTests_EnsureReady_RegisterNewerIfAvailable_Elevated) + TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Method") + END_TEST_CLASS() + + TEST_CLASS_SETUP(ClassSetup) + { + if (!::WindowsVersion::IsWindows10_20H1OrGreater()) + { + WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); + return true; + } + + TD::DumpExecutionContext(); + + RemovePackage_Blue(); + RemovePackage_Green(); + RemovePackage_Redder(); + RemovePackage_Red(); + AddPackage_Red(); + ::TB::Setup(); + + if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) + { + WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"IsPackageReadyOrNewerAvailable not supported. Skipping tests"); + return true; + } + + return true; + } + + TEST_CLASS_CLEANUP(ClassCleanup) + { + TD::DumpExecutionContext(); + + RemovePackage_Blue(); + RemovePackage_Green(); + RemovePackage_Redder(); + RemovePackage_Red(); + ::TB::Cleanup(); + return true; + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_RegisteredPackageStatusBad_Success) + { + BEGIN_TEST_METHOD_PROPERTIES() + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") + END_TEST_METHOD_PROPERTIES() + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + AddPackage_Red(); + SetPackageStatusByPackageFamilyName(::TPF::Red::c_packageFamilyName, winrt::Windows::Management::Deployment::PackageStatus::Modified); + VERIFY_IS_TRUE(IsPackageRegistered_Red()); + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(IsPackageRegistered_Red()); + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_RegisteredPackageStatusOkAndBad_Success) + { + BEGIN_TEST_METHOD_PROPERTIES() + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") + END_TEST_METHOD_PROPERTIES() + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + AddPackage_Red(); + AddPackage_Green(); + SetPackageStatusByPackageFamilyName(::TPF::Green::c_packageFamilyName, winrt::Windows::Management::Deployment::PackageStatus::Modified); + VERIFY_IS_FALSE(packageDeploymentManager.IsPackageReady(::TPF::Green::GetPackageFullName())); + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Green::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageReady(::TPF::Green::GetPackageFullName())); + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_1_RegisteredNewerStaged_Success) + { + BEGIN_TEST_METHOD_PROPERTIES() + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") + END_TEST_METHOD_PROPERTIES() + + RemovePackage_Redder(); + AddPackage_Red(); + StagePackage_Redder(); + + VERIFY_IS_TRUE(IsPackageRegistered_Red()); + VERIFY_IS_FALSE(IsPackageRegistered_Redder()); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_FALSE(IsPackageRegistered_Red()); + VERIFY_IS_TRUE(IsPackageRegistered_Redder()); + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + + RemovePackage_Redder(); + } + + TEST_METHOD(EnsurePackageSetReadyAsync_N_RegisteredAndNewerStaged_Success) + { + BEGIN_TEST_METHOD_PROPERTIES() + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") + END_TEST_METHOD_PROPERTIES() + + RemovePackage_Redder(); + AddPackage_Red(); + StagePackage_Redder(); + AddPackage_Green(); + + VERIFY_IS_TRUE(IsPackageRegistered_Red()); + VERIFY_IS_FALSE(IsPackageRegistered_Redder()); + VERIFY_IS_TRUE(IsPackageRegistered_Green()); + + auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; + + winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; + PCWSTR c_packageSetId{ L"RGB" }; + packageSet.Id(c_packageSetId); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem red{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Red::c_packageDirName) }; + packageSet.Items().Append(red); + winrt::Microsoft::Windows::Management::Deployment::PackageSetItem green{ Make_PackageSetItem(::TPF::Red::GetPackageFullName(), ::TPF::Green::c_packageDirName) }; + packageSet.Items().Append(green); + + winrt::Microsoft::Windows::Management::Deployment::EnsureReadyOptions options; + options.RegisterNewerIfAvailable(true); + auto deploymentOperation{ packageDeploymentManager.EnsurePackageSetReadyAsync(packageSet, options) }; + auto deploymentResult{ WaitForDeploymentOperation(deploymentOperation) }; + TPMT::VerifyDeploymentSucceeded(deploymentResult, __FILE__, __LINE__, __FUNCTION__); + + VERIFY_IS_FALSE(IsPackageRegistered_Red()); + VERIFY_IS_TRUE(IsPackageRegistered_Redder()); + VERIFY_IS_TRUE(IsPackageRegistered_Green()); + VERIFY_IS_TRUE(packageDeploymentManager.IsPackageSetReady(packageSet)); + + RemovePackage_Redder(); + } + }; +} diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_IsPackageRegistrationPending.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_IsPackageRegistrationPending.cpp index a92c823a71..006e46bf17 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_IsPackageRegistrationPending.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_IsPackageRegistrationPending.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_IsPackageRegistrationPending) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blacker(); RemovePackage_Black(); ::TB::Setup(); diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_IsReady.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_IsReady.cpp index 7faf3387b6..4c85b610e5 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_IsReady.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_IsReady.cpp @@ -21,6 +21,8 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_IsReady) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ + TEST_CLASS_PROPERTY(L"RunAs", L"RestrictedUser") END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +32,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -389,7 +394,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(IsPackageSetReady_N_No_NotAllPackageStatusOK) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_IsReadyOrNewerAvailable.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_IsReadyOrNewerAvailable.cpp index 9a2b56a971..ca9ed83ca5 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_IsReadyOrNewerAvailable.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_IsReadyOrNewerAvailable.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_IsReadyOrNewerAvailable) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -165,6 +169,8 @@ namespace Test::PackageManager::Tests PCWSTR packageFullName{ ::TPM::Black::GetPackageFullName() }; VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::NewerAvailable, packageDeploymentManager.IsPackageReadyOrNewerAvailable(packageFullName)); + + RemovePackage_Blacker(); } TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_InvalidParameter) @@ -188,104 +194,6 @@ namespace Test::PackageManager::Tests } } - TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_NoSuchPackage_NotReady) - { - if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) - { - return; - } - - auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; - - PCWSTR c_packageFamilyName{ L"Does.Not.Exist_1234567890abc" }; - - VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::NotReady, packageDeploymentManager.IsPackageReadyOrNewerAvailable(c_packageFamilyName)); - } - - TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_NotInstalled_NotReady) - { - if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) - { - return; - } - - RemovePackage_Red(); - - auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; - - PCWSTR packageFamilyName{ ::TPF::Red::c_packageFamilyName }; - - VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::NotReady, packageDeploymentManager.IsPackageReadyOrNewerAvailable(packageFamilyName)); - } - - TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_Registered_Ready) - { - if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) - { - return; - } - - AddPackage_Red(); - - auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; - - PCWSTR packageFamilyName{ ::TPF::Red::c_packageFamilyName }; - - VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::Ready, packageDeploymentManager.IsPackageReadyOrNewerAvailable(packageFamilyName)); - } - - TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_OlderRegistered_NotReady) - { - if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) - { - return; - } - - AddPackage_Red(); - - auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; - - PCWSTR packageFamilyName{ ::TPF::Redder::c_packageFamilyName }; - - VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::NotReady, packageDeploymentManager.IsPackageReadyOrNewerAvailable(packageFamilyName)); - } - - TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_NewerRegistered_Ready) - { - if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) - { - return; - } - - AddPackage_Redder(); - - auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; - - PCWSTR packageFamilyName{ ::TPF::Red::c_packageFamilyName }; - - VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::Ready, packageDeploymentManager.IsPackageReadyOrNewerAvailable(packageFamilyName)); - - RemovePackage_Redder(); - } - - TEST_METHOD(IsPackageReadyOrNewerAvailable_PackageFamilyName_NewerAvailable) - { - if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) - { - return; - } - - RemovePackage_Blacker(); - AddPackage_Black(); - StagePackage_Blacker(); - - auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; - - PCWSTR packageFamilyName{ ::TPM::Black::c_packageFamilyName }; - - VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::NewerAvailable, packageDeploymentManager.IsPackageReadyOrNewerAvailable(packageFamilyName)); - } - TEST_METHOD(IsPackageReadyOrNewerAvailableByUri_InvalidParameter) { if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable() || TPMT::SkipIfFeatureNotSupported_PackageUriScheme_ms_uup()) @@ -414,24 +322,6 @@ namespace Test::PackageManager::Tests VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); } - try - { - winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; - PCWSTR c_packageSetId{ L"Does.Not.Exist" }; - packageSet.Id(c_packageSetId); - winrt::Microsoft::Windows::Management::Deployment::PackageSetItem packageSetItem; - PCWSTR c_packageFamilyName{ L"Does.Not.Exist_1234567890abc" }; - packageSetItem.PackageFamilyName(c_packageFamilyName); - packageSet.Items().Append(packageSetItem); - - packageDeploymentManager.IsPackageSetReadyOrNewerAvailable(packageSet); - VERIFY_FAIL(L"Success is not expected"); - } - catch (winrt::hresult_error& e) - { - VERIFY_ARE_EQUAL(E_INVALIDARG, e.code(), WEX::Common::String().Format(L"0x%X %s", e.code(), e.message().c_str())); - } - try { winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet; @@ -577,6 +467,8 @@ namespace Test::PackageManager::Tests packageSet.Items().Append(black); VERIFY_ARE_EQUAL(winrt::Microsoft::Windows::Management::Deployment::PackageReadyOrNewerAvailableStatus::NewerAvailable, packageDeploymentManager.IsPackageSetReadyOrNewerAvailable(packageSet)); + + RemovePackage_Blacker(); } TEST_METHOD(IsPackageSetReadyOrNewerAvailable_N_NotInstalled_NotReady) @@ -738,7 +630,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(IsPackageSetReadyOrNewerAvailable_N_No_NotAllPackageStatusOK) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_IsPackageReadyOrNewerAvailable()) @@ -810,7 +702,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(IsPackageSetReady_1_RegisteredPackageStatusBad_No) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Module.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Module.cpp new file mode 100644 index 0000000000..b738d41cb5 --- /dev/null +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Module.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +#include "pch.h" + +BEGIN_MODULE() + MODULE_PROPERTY(L"IsolationLevel", L"Class") +END_MODULE() diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Provision.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Provision.cpp index fd11abd058..6e4001e97c 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Provision.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Provision.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Provision) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -34,6 +35,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Red(); ::TB::Setup(); return true; diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Register.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Register.cpp index b4edb5b765..323f23648e 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Register.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Register.cpp @@ -36,6 +36,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Register) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -45,6 +46,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RETURN_TRUE_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); RemovePackage_Blue(); RemovePackage_Green(); @@ -88,7 +92,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageAsync_Framework_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); @@ -112,11 +116,12 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageAsync_Main_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); StagePackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -157,6 +162,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -177,6 +183,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Redder(); AddPackage_Red(); StagePackage_Redder(); @@ -201,6 +208,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_Blacker(); @@ -240,7 +248,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageByUriAsync_Framework_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); @@ -266,11 +274,12 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageByUriAsync_Main_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); StagePackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -315,6 +324,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -337,6 +347,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Redder(); AddPackage_Red(); StagePackage_Redder(); @@ -363,6 +374,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_Blacker(); @@ -388,7 +400,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Framework_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); @@ -414,11 +426,12 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Main_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); StagePackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -440,7 +453,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Framework_1_Staged_PackageFamilyName_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); @@ -466,11 +479,12 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Main_1_Staged_PackageFamilyName_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); StagePackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -515,6 +529,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -559,6 +574,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -581,6 +597,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Redder(); AddPackage_Red(); StagePackage_Redder(); @@ -609,6 +626,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_Blacker(); @@ -637,6 +655,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Redder(); AddPackage_Red(); StagePackage_Redder(); @@ -665,6 +684,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_Blacker(); @@ -721,6 +741,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); AddPackage_White(); @@ -774,6 +795,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); AddPackage_White(); @@ -799,6 +821,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Redder(); AddPackage_Red(); StagePackage_Redder(); AddPackage_Green(); @@ -825,11 +848,13 @@ namespace Test::PackageManager::Tests VERIFY_IS_FALSE(IsPackageRegistered_Red()); VERIFY_IS_TRUE(IsPackageRegistered_Redder()); + RemovePackage_Redder(); } TEST_METHOD(RegisterPackageSetAsync_Main_N_OlderRegistered_Success) { + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_Blacker(); AddPackage_White(); @@ -853,6 +878,7 @@ namespace Test::PackageManager::Tests VERIFY_IS_FALSE(IsPackageRegistered_Black()); VERIFY_IS_TRUE(IsPackageRegistered_Blacker()); + RemovePackage_Blacker(); } @@ -860,6 +886,7 @@ namespace Test::PackageManager::Tests { RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Redder(); AddPackage_Red(); StagePackage_Redder(); AddPackage_Green(); @@ -886,11 +913,13 @@ namespace Test::PackageManager::Tests VERIFY_IS_FALSE(IsPackageRegistered_Red()); VERIFY_IS_TRUE(IsPackageRegistered_Redder()); + RemovePackage_Redder(); } TEST_METHOD(RegisterPackageSetAsync_Main_N_OlderRegistered_PackageFamilyName_Success) { + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_Blacker(); AddPackage_White(); @@ -914,13 +943,14 @@ namespace Test::PackageManager::Tests VERIFY_IS_FALSE(IsPackageRegistered_Black()); VERIFY_IS_TRUE(IsPackageRegistered_Blacker()); + RemovePackage_Blacker(); } TEST_METHOD(RegisterPackageSetAsync_Framework_N_RegisteredAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); @@ -949,11 +979,12 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Main_N_RegisteredAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_White(); @@ -978,7 +1009,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Framework_N_RegisteredAndStaged_PackageFamilyName_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); @@ -1007,11 +1038,12 @@ namespace Test::PackageManager::Tests TEST_METHOD(RegisterPackageSetAsync_Main_N_RegisteredAndStaged_PackageFamilyName_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RETURN_IF_SKIP_ON_WIN10_DUE_TO_0x80073D2B_IN_TEST(); + RemovePackage_Blacker(); AddPackage_Black(); StagePackage_White(); diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Remove.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Remove.cpp index 4db273f145..8132628696 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Remove.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Remove.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Remove) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -103,7 +107,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RemovePackageAsync_PackageFullName_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -189,7 +193,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RemovePackageAsync_PackageFamilyName_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -279,7 +283,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RemovePackageByFullNameAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -346,7 +350,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RemovePackageByFamilyNameAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -430,7 +434,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageByUriAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RemovePackageByUri() || TPMT::SkipIfFeatureNotSupported_PackageUriScheme_ms_uup()) @@ -544,7 +548,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_Uri_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -745,7 +749,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_Uri_N_RegisteredAndNotInstalledAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); @@ -855,7 +859,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_NoUri_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() StagePackage_Red(); @@ -1022,7 +1026,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_NoUri_N_RegisteredAndNotInstalledAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); @@ -1096,7 +1100,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageAsync_PackageFullName_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1120,7 +1124,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageAsync_PackageFamilyName_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1144,7 +1148,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageByFullNameAsync_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1168,7 +1172,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageByFamilyNameAsync_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1202,7 +1206,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_Uri_1_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1237,7 +1241,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_Uri_N_RegisteredPackageStatusOkAndBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1272,7 +1276,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_NoUri_1_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -1302,7 +1306,7 @@ WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ErrorText: %s", deploy TEST_METHOD(RemovePackageSetAsync_NoUri_N_RegisteredPackageStatusOkAndBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Repair.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Repair.cpp index d343106747..551e1126bd 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Repair.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Repair.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Repair) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -92,7 +96,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageAsync_PackageFullName_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage()) @@ -162,7 +166,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageAsync_PackageFamilyName_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage()) @@ -238,7 +242,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageByUriAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage() || TPMT::SkipIfFeatureNotSupported_PackageUriScheme_ms_uup()) @@ -316,7 +320,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageSetAsync_1_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage()) @@ -464,7 +468,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageSetAsync_N_RegisteredAndNotInstalledAndStaged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage()) @@ -541,7 +545,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageAsync_PackageFullName_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage()) @@ -568,7 +572,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(RepairPackageAsync_PackageFamilyName_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_RepairPackage()) diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Reset.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Reset.cpp index 0c2dcc7fec..45b916cdf6 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Reset.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Reset.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Reset) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -92,7 +96,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageAsync_PackageFullName_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage()) @@ -166,7 +170,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageAsync_PackageFamilyName_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage()) @@ -246,7 +250,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageByUriAsync_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage() || TPMT::SkipIfFeatureNotSupported_PackageUriScheme_ms_uup()) @@ -324,7 +328,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageSetAsync_1_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage()) @@ -472,7 +476,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageSetAsync_N_RegisteredAndNotInstalledAndStaged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage()) @@ -549,7 +553,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageAsync_PackageFullName_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage()) @@ -580,7 +584,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(ResetPackageAsync_PackageFamilyName_RegisteredPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() if (TPMT::SkipIfFeatureNotSupported_ResetPackage()) diff --git a/test/PackageManager/API/PackageDeploymentManagerTests_Stage.cpp b/test/PackageManager/API/PackageDeploymentManagerTests_Stage.cpp index 5f302b58ad..fa80eaa837 100644 --- a/test/PackageManager/API/PackageDeploymentManagerTests_Stage.cpp +++ b/test/PackageManager/API/PackageDeploymentManagerTests_Stage.cpp @@ -21,6 +21,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageDeploymentManagerTests_Stage) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -30,6 +31,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageDeploymentManager requires >= 20H1 (Vibranium). Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -89,7 +93,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RemovePackageFamily_Red(); @@ -206,7 +210,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageByUriAsync_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RemovePackageFamily_Red(); @@ -334,7 +338,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageSetAsync_1_Staged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RemovePackageFamily_Red(); @@ -654,7 +658,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageSetAsync_N_StagedAndNotInstalledAndStaged_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RemovePackageFamily_Red(); @@ -729,7 +733,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageAsync_StagedPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -754,7 +758,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageByUriAsync_StagedPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -778,7 +782,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageSetAsync_1_StagedPackageStatusBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; @@ -806,7 +810,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(StagePackageSetAsync_N_StagedPackageStatusOkAndBad_Success) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() auto packageDeploymentManager{ winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager::GetDefault() }; diff --git a/test/PackageManager/API/PackageManagerTests.vcxproj b/test/PackageManager/API/PackageManagerTests.vcxproj index c60298ae3c..6570ca62dd 100644 --- a/test/PackageManager/API/PackageManagerTests.vcxproj +++ b/test/PackageManager/API/PackageManagerTests.vcxproj @@ -115,9 +115,11 @@ + + diff --git a/test/PackageManager/API/PackageManagerTests.vcxproj.filters b/test/PackageManager/API/PackageManagerTests.vcxproj.filters index 2f54e9455b..aa5b312029 100644 --- a/test/PackageManager/API/PackageManagerTests.vcxproj.filters +++ b/test/PackageManager/API/PackageManagerTests.vcxproj.filters @@ -33,6 +33,9 @@ Source Files + + Source Files + Source Files @@ -42,6 +45,9 @@ Source Files + + Source Files + Source Files diff --git a/test/PackageManager/API/PackageManagerTests_Module.cpp b/test/PackageManager/API/PackageManagerTests_Module.cpp new file mode 100644 index 0000000000..b738d41cb5 --- /dev/null +++ b/test/PackageManager/API/PackageManagerTests_Module.cpp @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +#include "pch.h" + +BEGIN_MODULE() + MODULE_PROPERTY(L"IsolationLevel", L"Class") +END_MODULE() diff --git a/test/PackageManager/API/PackageRuntimeManagerTests.cpp b/test/PackageManager/API/PackageRuntimeManagerTests.cpp index 8e7e4f0179..d053918df6 100644 --- a/test/PackageManager/API/PackageRuntimeManagerTests.cpp +++ b/test/PackageManager/API/PackageRuntimeManagerTests.cpp @@ -19,6 +19,7 @@ namespace Test::PackageManager::Tests public: BEGIN_TEST_CLASS(PackageRuntimeManagerTests) TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA") + TEST_CLASS_PROPERTY(L"IsolationLevel", L"Class") /****SEEME****/ END_TEST_CLASS() TEST_CLASS_SETUP(ClassSetup) @@ -28,6 +29,9 @@ namespace Test::PackageManager::Tests WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped, L"PackageRuntimeManager requires Dynamic Dependencies delegating to OS Dynamic Dependencies. Skipping tests"); return true; } + + TD::DumpExecutionContext(); + RemovePackage_Blue(); RemovePackage_Green(); RemovePackage_Redder(); @@ -231,7 +235,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSet_1_Staged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() RemovePackage_Red(); @@ -324,13 +328,14 @@ namespace Test::PackageManager::Tests const auto packageSetRuntimeDisposition{ packageRuntimeManager.AddPackageSet(packageSet, createOptions, addOptions) }; packageRuntimeManager.RemovePackageSet(packageSetRuntimeDisposition); + RemovePackage_Redder(); } TEST_METHOD(AddPackageSet_1_RegisteredPackageStatusBad_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); @@ -442,6 +447,7 @@ namespace Test::PackageManager::Tests const auto packageSetRuntimeDisposition{ packageRuntimeManager.AddPackageSet(packageSet, createOptions, addOptions) }; packageRuntimeManager.RemovePackageSet(packageSetRuntimeDisposition); + RemovePackage_Redder(); } @@ -509,7 +515,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSet_N_RegisteredAndNotInstalledAndStaged_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); @@ -545,7 +551,7 @@ namespace Test::PackageManager::Tests TEST_METHOD(AddPackageSet_N_RegisteredPackageStatusOkAndBad_Fail) { BEGIN_TEST_METHOD_PROPERTIES() - TEST_CLASS_PROPERTY(L"RunAs", L"ElevatedUser") + TEST_METHOD_PROPERTY(L"RunAs", L"ElevatedUser") END_TEST_METHOD_PROPERTIES() AddPackage_Red(); diff --git a/test/PackageManager/API/Test.testdef b/test/PackageManager/API/Test.testdef index 4f9f4e6de3..21cdbb48a8 100644 --- a/test/PackageManager/API/Test.testdef +++ b/test/PackageManager/API/Test.testdef @@ -1,9 +1,93 @@ { "Tests": [ { - "Description": "PackageManagerTests tests for feature PackageManager (arm64 not currently enabled)", + "Description": "Add PackageManagerTests tests for feature PackageManager (arm64 not currently enabled)", "Filename": "PackageManagerTests.dll", - "Parameters": "", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests::*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Add* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Add*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Deprovision* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Deprovision*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.EnsureReady* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_EnsureReady*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.IsPackageRegistrationPending* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_IsPackageRegistrationPending*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.IsReady::* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_IsReady::*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.IsReadyOrNewerAvailable* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_IsReadyOrNewerAvailable*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Provision* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Provision*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Register* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Register*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Remove* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Remove*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Repair* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Repair*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Reset* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Reset*", + "Architectures": ["x86", "x64"], + "Status": "Enabled" + }, + { + "Description": "PackageManagerTests.Stage* tests for feature PackageManager (arm64 not currently enabled)", + "Filename": "PackageManagerTests.dll", + "Parameters": "/name=Test::PackageManager::Tests::PackageDeploymentManagerTests_Stage*", "Architectures": ["x86", "x64"], "Status": "Enabled" } diff --git a/test/PackageManager/API/packages.config b/test/PackageManager/API/packages.config index d81bf54e18..55f622ab9d 100644 --- a/test/PackageManager/API/packages.config +++ b/test/PackageManager/API/packages.config @@ -6,5 +6,5 @@ - + diff --git a/test/inc/WindowsAppRuntime.Test.TAEF.cppwinrt.h b/test/inc/WindowsAppRuntime.Test.TAEF.cppwinrt.h new file mode 100644 index 0000000000..2662a1eb27 --- /dev/null +++ b/test/inc/WindowsAppRuntime.Test.TAEF.cppwinrt.h @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation and Contributors. All rights reserved. +// Licensed under the MIT License. + +#ifndef __WINDOWSAPPRUNTIME_TEST_TAEF_CPPWINRT_H +#define __WINDOWSAPPRUNTIME_TEST_TAEF_CPPWINRT_H + +namespace WEX::TestExecution +{ + // Teach TAEF how to format a winrt::hstring + template <> + class VerifyOutputTraits + { + public: + static WEX::Common::NoThrowString ToString(winrt::hstring const& value) + { + const auto s{ value.c_str() }; + if (!s) + { + return WEX::Common::NoThrowString(L"nullptr"); + } + else + { + return WEX::Common::NoThrowString().Format(L"\"%s\"", s); + } + } + }; + + // Teach TAEF how to compare a winrt::hstring + template <> + class VerifyCompareTraits + { + public: + static bool AreEqual(winrt::hstring const& expected, winrt::hstring const& actual) + { + return Compare(expected, actual) == 0; + } + + static bool AreSame(winrt::hstring const& expected, winrt::hstring const& actual) + { + return &expected == &actual; + } + + static bool IsLessThan(winrt::hstring const& expectedLess, winrt::hstring const& expectedGreater) + { + return Compare(expectedLess, expectedGreater) < 0; + } + + static bool IsGreaterThan(winrt::hstring const& expectedGreater, winrt::hstring const& expectedLess) + { + return Compare(expectedGreater, expectedLess) > 0; + } + + static bool IsNull(winrt::hstring const& object) + { + return object.c_str() == nullptr; + } + private: + static int Compare(winrt::hstring const& left, winrt::hstring const& right) + { + if (left == right) + { + return 0; + } + else if (left.c_str() == nullptr) + { + return -1; + } + else if (right.c_str() == nullptr) + { + return 1; + } + else + { + return CompareStringOrdinal(left .c_str(), -1, right.c_str(), -1, FALSE) - CSTR_EQUAL; + } + } + }; +} + +#endif // __WINDOWSAPPRUNTIME_TEST_TAEF_CPPWINRT_H diff --git a/test/inc/inc.vcxitems b/test/inc/inc.vcxitems index d23893d89b..267aefad48 100644 --- a/test/inc/inc.vcxitems +++ b/test/inc/inc.vcxitems @@ -20,6 +20,7 @@ +