[AOT] added AotCompatibility test app exit code assertion (#4743)
This commit is contained in:
parent
9e91904494
commit
eb9c30aa6b
|
|
@ -24,6 +24,6 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
|
||||
- name: Read publish AOT testApp output and assert warning count
|
||||
- name: publish AOT testApp, assert static analysis warning count, and run the app
|
||||
shell: pwsh
|
||||
run: .\build\assert-publish-aot-testApp-warning-count.ps1
|
||||
run: .\build\test-aot-compatibility.ps1 ${{ matrix.version }}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E-03FA-4FFF-89A5-C51F107623FD}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\assert-publish-aot-testApp-warning-count.ps1 = build\assert-publish-aot-testApp-warning-count.ps1
|
||||
build\Common.nonprod.props = build\Common.nonprod.props
|
||||
build\Common.prod.props = build\Common.prod.props
|
||||
build\Common.props = build\Common.props
|
||||
|
|
@ -46,6 +45,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E
|
|||
build\RELEASING.md = build\RELEASING.md
|
||||
build\stylecop.json = build\stylecop.json
|
||||
build\xunit.runner.json = build\xunit.runner.json
|
||||
build\test-aot-compatibility.ps1 = build\test-aot-compatibility.ps1
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Zipkin", "src\OpenTelemetry.Exporter.Zipkin\OpenTelemetry.Exporter.Zipkin.csproj", "{7EDAE7FA-B44E-42CA-80FA-7DF2FAA2C5DD}"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
param([string]$targetNetFramework)
|
||||
|
||||
$rootDirectory = Split-Path $PSScriptRoot -Parent
|
||||
$publishOutput = dotnet publish $rootDirectory\test\OpenTelemetry.AotCompatibility.TestApp\OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false
|
||||
$publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false
|
||||
|
||||
$actualWarningCount = 0
|
||||
|
||||
|
|
@ -12,6 +14,19 @@ foreach ($line in $($publishOutput -split "`r`n"))
|
|||
}
|
||||
}
|
||||
|
||||
pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Debug/$targetNetFramework/linux-x64
|
||||
|
||||
Write-Host "Executing test App..."
|
||||
./OpenTelemetry.AotCompatibility.TestApp
|
||||
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 = 28
|
||||
|
||||
Loading…
Reference in New Issue