Skip to content

Commit

Permalink
Fix AoT test script false negatives
Browse files Browse the repository at this point in the history
- Script did not fail for errors, only warnings.
- Script did not fail if publishing failed.
  • Loading branch information
martincostello committed Jan 22, 2024
1 parent 4fa6570 commit ce57646
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/test-aot-compatibility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $actualWarningCount = 0

foreach ($line in $($publishOutput -split "`r`n"))
{
if ($line -like "*analysis warning IL*")
if (($line -like "*analysis warning IL*") -or ($line -like "*analysis error IL*"))
{
Write-Host $line
$actualWarningCount += 1
Expand All @@ -20,6 +20,11 @@ foreach ($line in $($publishOutput -split "`r`n"))
Write-Host "Actual warning count is:", $actualWarningCount
$expectedWarningCount = 0

if ($LastExitCode -ne 0)
{
Write-Host "There was an error while publishing AotCompatibility Test App. LastExitCode is:", $LastExitCode
}

pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Release/$targetNetFramework/$runtime

Write-Host "Executing test App..."
Expand Down

0 comments on commit ce57646

Please sign in to comment.