mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-15 17:44:33 +00:00
<!-- Thank you for your contribution! Please review https://microsoft.github.io/autogen/docs/Contribute before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number <!-- For example: "Closes #1234" --> ## Checks - [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally. - [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [ ] I've made sure all auto checks have passed.
41 lines
1.1 KiB
PowerShell
41 lines
1.1 KiB
PowerShell
param([string]$targetNetFramework)
|
|
|
|
$rootDirectory = Split-Path $PSScriptRoot -Parent
|
|
$publishOutput = dotnet publish $rootDirectory/test/AutoGen.AotCompatibility.Tests -nodeReuse:false /p:UseSharedCompilation=false /p:ExposeExperimentalFeatures=true
|
|
|
|
$actualWarningCount = 0
|
|
|
|
foreach ($line in $($publishOutput -split "`r`n"))
|
|
{
|
|
if ($line -like "*analysis warning IL*")
|
|
{
|
|
Write-Host $line
|
|
|
|
$actualWarningCount += 1
|
|
}
|
|
}
|
|
|
|
pushd $rootDirectory/artifacts/bin/AutoGen.AotCompatibility.Tests/release/native
|
|
|
|
Write-Host "Executing test App..."
|
|
./AutoGen.AotCompatibility.Tests
|
|
Write-Host "Finished executing test App"
|
|
|
|
if ($LastExitCode -ne 0)
|
|
{
|
|
Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode
|
|
}
|
|
|
|
popd
|
|
|
|
Write-Host "Actual warning count is:", $actualWarningCount
|
|
$expectedWarningCount = 0
|
|
|
|
$testPassed = 0
|
|
if ($actualWarningCount -ne $expectedWarningCount)
|
|
{
|
|
$testPassed = 1
|
|
Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount
|
|
}
|
|
|
|
Exit $testPassed |