up
This commit is contained in:
25
scripts/crypto/run-cryptopro-tests.ps1
Normal file
25
scripts/crypto/run-cryptopro-tests.ps1
Normal file
@@ -0,0 +1,25 @@
|
||||
param(
|
||||
[string]$Configuration = "Release"
|
||||
)
|
||||
|
||||
if (-not $IsWindows) {
|
||||
Write-Host "CryptoPro tests require Windows" -ForegroundColor Yellow
|
||||
exit 0
|
||||
}
|
||||
|
||||
if (-not (Get-Command dotnet -ErrorAction SilentlyContinue)) {
|
||||
Write-Host "dotnet SDK not found" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Opt-in flag to avoid accidental runs on agents without CryptoPro CSP installed
|
||||
$env:STELLAOPS_CRYPTO_PRO_ENABLED = "1"
|
||||
|
||||
Write-Host "Running CryptoPro-only tests..." -ForegroundColor Cyan
|
||||
|
||||
pushd $PSScriptRoot\..\..
|
||||
try {
|
||||
dotnet test src/__Libraries/__Tests/StellaOps.Cryptography.Tests/StellaOps.Cryptography.Tests.csproj -c $Configuration --filter CryptoProGostSignerTests
|
||||
} finally {
|
||||
popd
|
||||
}
|
||||
Reference in New Issue
Block a user