Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions families/msix/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ powershell_test(
data = [
":app_arm64",
":argv_signtool",
"//:sign.ps1",
"//:signtool",
"//tests/fixtures/msix-app/app",
"//tests/fixtures/msix-app/app:app_sign",
Expand All @@ -543,7 +544,7 @@ powershell_test(
"DX_MSIX_ARGV_SIGNTOOL": "$(rlocationpaths :argv_signtool)",
"DX_MSIX_ARM64": "$(rlocationpaths :app_arm64)",
"DX_MSIX_PACKAGE": "$(rlocationpaths //tests/fixtures/msix-app/app)",
"DX_MSIX_SIGN": "$(rlocationpath //tests/fixtures/msix-app/app:app_sign)",
"DX_MSIX_SIGN": "$(rlocationpath //:sign.ps1)",
"DX_MSIX_SIGNTOOL": "$(rlocationpaths //:signtool)",
},
target_compatible_with = _WINDOWS,
Expand All @@ -565,6 +566,7 @@ sign_env_test(
data = [
":app_noresource",
":app_probe",
"//:sign.ps1",
"//:signtool",
"//tests/fixtures/msix-app/app",
"//tests/fixtures/msix-app/app:app_sign",
Expand All @@ -574,7 +576,7 @@ sign_env_test(
"DX_MSIX_NORESOURCE": "$(rlocationpaths :app_noresource)",
"DX_MSIX_PACKAGE": "$(rlocationpaths //tests/fixtures/msix-app/app)",
"DX_MSIX_PROBE": "$(rlocationpaths :app_probe)",
"DX_MSIX_SIGN": "$(rlocationpath //tests/fixtures/msix-app/app:app_sign)",
"DX_MSIX_SIGN": "$(rlocationpath //:sign.ps1)",
"DX_MSIX_SIGNTOOL": "$(rlocationpaths //:signtool)",
"DX_MSIX_X64": "$(rlocationpaths //tests/fixtures/msix-app/app)",
},
Expand Down
4 changes: 3 additions & 1 deletion families/msix/tests/install_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ $now = [System.DateTimeOffset]::UtcNow
$pfx = Join-Path $env:TEST_TMPDIR "untrusted.pfx"
[System.IO.File]::WriteAllBytes($pfx, $request.CreateSelfSigned($now.AddDays(-1), $now.AddDays(1)).Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pfx, ""))
$signed = Join-Path $env:TEST_TMPDIR "untrusted.msix"
$sign = Invoke-Process (Get-Process -Id $PID).Path @("-NoLogo", "-NoProfile", "-NonInteractive", "-File", $runfiles.Rlocation($env:DX_MSIX_SIGN), "-Pfx", $pfx, "-Out", $signed)
$signScript = $runfiles.Rlocation($env:DX_MSIX_SIGN)
if (-not $signScript.EndsWith(".ps1")) { throw "DX_MSIX_SIGN is not a .ps1: $signScript" }
$sign = Invoke-Process (Get-Process -Id $PID).Path @("-NoLogo", "-NoProfile", "-NonInteractive", "-File", $signScript, "-Pfx", $pfx, "-Out", $signed)
Assert-Equal 0 $sign.Exit "untrusted sign exit ($($sign.Stderr))"
Remove-TestPackage $identity.name
try {
Expand Down
1 change: 1 addition & 0 deletions families/msix/tests/sign_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ function Assert-Refused([string]$Label, $Result, [int]$Exit, [string]$Message, [
}

$sign = $runfiles.Rlocation($env:DX_MSIX_SIGN)
if (-not $sign.EndsWith(".ps1")) { throw "DX_MSIX_SIGN is not a .ps1: $sign" }
$package = Find-Runfile $env:DX_MSIX_PACKAGE ".msix"
$identity = Get-Content -LiteralPath (Find-Runfile $env:DX_MSIX_PACKAGE ".msix.identity.json") -Raw | ConvertFrom-Json -AsHashtable
$unsigned = (Get-FileHash -LiteralPath $package -Algorithm SHA256).Hash.ToLowerInvariant()
Expand Down
Loading