dotnet / dotnet/aspnetcore

x86 Server functional tests fail locally

Open
#7,816 2 comments 0 reactions 0 assignees View on GitHub
affected-very-few area-networking severity-nice-to-have task
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

The ServerComparison.FunctionalTests x86 tests fail if run directly because they look for the x86 runtime in the wrong place. It was recently moved from `%userprofile%\.dotnet\x86` to `%reporoot%\.dotnet\x86`

```
Failed ServerComparison.FunctionalTests.HelloWorldTests.HelloWorld(variant: Server: Kestrel, TFM: netcoreapp3.0, Type: Portable, Arch: x86)
Error Message:
System.Exception : Command exited unexpectedly with exit code: -2147450730
Stack Trace:
at Microsoft.AspNetCore.Testing.TaskExtensions.TimeoutAfter[T](Task`1 task, TimeSpan timeout, String filePath, Int32 lineNumber)
at Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer.StartSelfHostAsync(Uri hintUrl) in d:\github\AspNetCore\src\Hosting\Server.IntegrationTesting\src\Deployers\SelfHostDeployer.cs:line 190
at Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer.DeployAsync() in d:\github\AspNetCore\src\Hosting\Server.IntegrationTesting\src\Deployers\SelfHostDeployer.cs:line 65
at ServerComparison.FunctionalTests.HelloWorldTests.HelloWorld(TestVariant variant) in d:\github\AspNetCore\src\Servers\test\FunctionalTests\HelloWorldTest.cs:line 52
--- End of stack trace from previous location where exception was thrown ---
Standard Output Messages:
| [0.005s] TestLifetime Information: Starting test HelloWorld-Server: Kestrel, TFM: netcoreapp3.0, Type: Portable, Arch: x86 at 2019-02-21T19:37:07
| [0.003s] TestLifetime Information: Starting test HelloWorld_Kestrel_netcoreapp3.0_x86_Portable at 2019-02-21T19:37:07
| [0.004s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Deploying [Variation] :: ServerType=Kestrel, Runtime=CoreClr, Arch=x86, BaseUrlHint=, Publish=False
| [0.005s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Executing C:\Users\chrross\.dotnet\x86\dotnet.exe d:\github\AspNetCore\src\Servers\testassets\ServerComparison.TestSites\bin\Debug\netcoreapp3.0\ServerComparison.TestSites.dll --urls http://127.0.0.1:0/ --server Microsoft.AspNetCore.Server.Kestrel
| [0.006s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Removing environment variable ASPNETCORE_ENVIRONMENT
| [0.006s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET ASPNETCORE_DETAILEDERRORS=true
| [0.007s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: SET ASPNETCORE_CONTENTROOT=d:\github\AspNetCore\src\Servers\testassets\ServerComparison.TestSites
| [0.048s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Started C:\Users\chrross\.dotnet\x86\dotnet.exe. Process Id : 18680
| [0.169s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: It was not possible to find any compatible framework version
| [0.170s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: The specified framework 'Microsoft.NETCore.App', version '3.0.0-preview3-27414-8' was not found.
| [0.170s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: - Check application dependencies and target a framework version installed at:
| [0.171s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: C:\Users\chrross\.dotnet\x86\
| [0.171s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: - The .NET Core framework and SDK can be installed from:
| [0.171s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: https://aka.ms/dotnet-download
| [0.171s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: - The following versions are installed:
| [0.172s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.0.0 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.172s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.0.9 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.172s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.1.2 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.172s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.1.6 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.173s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.1.7 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.173s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.2.0 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.173s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 2.2.1 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.174s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 3.0.0-preview-27217-02 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.174s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 3.0.0-preview-27219-3 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.174s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 3.0.0-preview-27319-3 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.175s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: 3.0.0-preview-27324-5 at [C:\Users\chrross\.dotnet\x86\shared\Microsoft.NETCore.App]
| [0.175s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: - Installing .NET Core prerequisites might help resolve this problem:
| [0.175s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: C:\Users\chrross\.dotnet\x86\dotnet.exe stderr: https://go.microsoft.com/fwlink/?linkid=798306
| [0.180s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: host process ID 18680 shut down
| [0.180s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: Host process shutting down.
| [0.181s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Warning: Host process already exited or never started successfully.
| [0.181s] Microsoft.AspNetCore.Server.IntegrationTesting.SelfHostDeployer Information: [Time]: Total time taken for this test variation '0.1767904' seconds
| [0.181s] TestLifetime Information: Finished test HelloWorld_Kestrel_netcoreapp3.0_x86_Portable in 0.1785128s
| [0.190s] TestLifetime Information: Finished test HelloWorld-Server: Kestrel, TFM: netcoreapp3.0, Type: Portable, Arch: x86 in 0.18489519999999998s
```

The discovery logic is outdated:
https://github.com/aspnet/AspNetCore/blob/4451a804477f7f3d4d0ed89d56c51332d8c3ee25/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs#L108-L114
https://github.com/aspnet/AspNetCore/blob/4451a804477f7f3d4d0ed89d56c51332d8c3ee25/src/Hosting/Server.IntegrationTesting/src/Common/DotNetCommands.cs#L14-L21
@natemcmaster does this work from a full build because DOTNET_HOME gets set?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.