-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca3edfe
commit cb1c0e9
Showing
2 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
[CmdletBinding()] | ||
param( | ||
[string]$testModulesPath, | ||
[string]$outputPath, | ||
[string]$packageLayoutPath, | ||
) | ||
|
||
# This updates pester not always necessary but worth noting | ||
Install-Module -Name Pester -Force -SkipPublisherCheck | ||
Import-Module Pester | ||
|
||
$env:PSModulePath += ";$testModulesPath" | ||
|
||
if (-not Test-Path $outputPath) | ||
{ | ||
New-Item -Path $outputPath -ItemType Directory | ||
} | ||
|
||
# Register the package | ||
if (-not [System.String]::IsNullOrEmpty($packageLayoutPath)) | ||
{ | ||
$local:packageManifestPath = Join-Path $packageLayoutPath "AppxManifest.xml" | ||
|
||
Add-AppxPackage -Register $local:packageManifestPath | ||
|
||
# Configure crash dump and log file settings | ||
$local:settingsExport = ConvertFrom-Json (wingetdev.exe settings export) | ||
$local:settingsFilePath = $local:settingsExport.userSettingsFile | ||
$local:settingsFileContent = ConvertTo-Json @{ debugging= @{ enableSelfInitiatedMinidump=$true ; keepAllLogFiles=$true } } | ||
|
||
Set-Content -Path $local:settingsFilePath -Value $local:settingsFileContent | ||
} | ||
|
||
Invoke-Pester -Script $PSScriptRoot\Microsoft.WinGet.Client.Tests.ps1 -OutputFile $outputPath\TestsPester.WinGetClient.XML -OutputFormat NUnitXML |