Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] WBT: Fix breaking tests #88751

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Conversation

radical
Copy link
Member

@radical radical commented Jul 12, 2023

Wasm.Build.Tests.WasmTemplateTests.RunWithDifferentAppBundleLocations

broke with the latest sdk:

/root/helix/work/workitem/e/dotnet-latest/sdk/8.0.100-preview.7.23362.1/Roslyn/Microsoft.CSharp.Core.targets(80,5): error MSB6004: The specified task executable location "/root/helix/work/workitem/e/dotnet-latest/dotnet/dotnet" is invalid.

This was because dotnet/roslyn#68918 changed
to expect DOTNET_ROOT to be a directory instead of the exe path.

[wasm] WBT: Set DOTNET_ROOT explicitly in the helix environment

The NonWasmTemplateBuildTests avoid using the default environment
variables used for all other tests, which includes DOTNET_ROOT. Set
DOTNET_ROOT explicitly in the helix setup script for windows, so we
always have a fallback.

    Wasm.Build.Tests.NonWasmTemplateBuildTests.NonWasmConsoleBuild_WithoutWorkload(config: "Debug", extraBuildArgs: "", targetFramework: "net6.0") [FAIL]
       Expected 0 exit code but got 1: C:\helix\work\workitem\e\dotnet-none\dotnet.exe build -restore -c Debug -bl:C:\helix\work\workitem\uploads\xharness-output\logs\nonwasm_net6.0_Debug_iyhtgmvj.uu4.binlog  -f net6.0
      Standard Output:
      [] MSBuild version 17.8.0-preview-23361-03+5ab64ed27 for .NET
      []   Determining projects to restore...
      []   Restored C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj (in 820 ms).
      []   Determining projects to restore...
      []   Restored C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj (in 11.21 sec).
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : You must install or update .NET to run this application. [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : App: C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\bincore\csc.dll [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Architecture: x64 [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Framework: 'Microsoft.NETCore.App', version '8.0.0-preview.7.23361.9' (x64) [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : .NET location: C:\helix\work\correlation\dotnet-cli\ [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : The following frameworks were found: [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :   8.0.0-preview.5.23280.8 at [C:\helix\work\correlation\dotnet-cli\shared\Microsoft.NETCore.App] [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Learn more: [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : https://aka.ms/dotnet/app-launch-failed [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : To install missing framework, download: [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0-preview.7.23361.9&arch=x64&rid=win10-x64 [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      []

Fixes #88752 .
Fixes #88779 .

`Wasm.Build.Tests.WasmTemplateTests.RunWithDifferentAppBundleLocations`
broke with the latest sdk:

`/root/helix/work/workitem/e/dotnet-latest/sdk/8.0.100-preview.7.23362.1/Roslyn/Microsoft.CSharp.Core.targets(80,5): error MSB6004: The specified task executable location "/root/helix/work/workitem/e/dotnet-latest/dotnet/dotnet" is invalid.`

This was because dotnet/roslyn#68918 changed
to expect `DOTNET_ROOT` to be a directory instead of the exe path.
@radical radical added the arch-wasm WebAssembly architecture label Jul 12, 2023
@ghost ghost assigned radical Jul 12, 2023
@ghost
Copy link

ghost commented Jul 12, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Wasm.Build.Tests.WasmTemplateTests.RunWithDifferentAppBundleLocations
broke with the latest sdk:

/root/helix/work/workitem/e/dotnet-latest/sdk/8.0.100-preview.7.23362.1/Roslyn/Microsoft.CSharp.Core.targets(80,5): error MSB6004: The specified task executable location "/root/helix/work/workitem/e/dotnet-latest/dotnet/dotnet" is invalid.

This was because dotnet/roslyn#68918 changed
to expect DOTNET_ROOT to be a directory instead of the exe path.

Author: radical
Assignees: -
Labels:

arch-wasm

Milestone: -

@radical radical requested review from lewing and maraf July 12, 2023 17:07
@radical radical added the test-enhancement Improvements of test source code label Jul 12, 2023
@lewing
Copy link
Member

lewing commented Jul 12, 2023

@radical merge this as soon as it is clear that the old failure is resolved

@radical
Copy link
Member Author

radical commented Jul 12, 2023

Looks like some others need the same thing.

The `NonWasmTemplateBuildTests` avoid using the default environment
variables used for all other tests, which includes `DOTNET_ROOT`. Set
`DOTNET_ROOT` explicitly in the helix setup script for windows, so we
always have a fallback.

```
    Wasm.Build.Tests.NonWasmTemplateBuildTests.NonWasmConsoleBuild_WithoutWorkload(config: "Debug", extraBuildArgs: "", targetFramework: "net6.0") [FAIL]
       Expected 0 exit code but got 1: C:\helix\work\workitem\e\dotnet-none\dotnet.exe build -restore -c Debug -bl:C:\helix\work\workitem\uploads\xharness-output\logs\nonwasm_net6.0_Debug_iyhtgmvj.uu4.binlog  -f net6.0
      Standard Output:
      [] MSBuild version 17.8.0-preview-23361-03+5ab64ed27 for .NET
      []   Determining projects to restore...
      []   Restored C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj (in 820 ms).
      []   Determining projects to restore...
      []   Restored C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj (in 11.21 sec).
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : You must install or update .NET to run this application. [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : App: C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\bincore\csc.dll [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Architecture: x64 [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Framework: 'Microsoft.NETCore.App', version '8.0.0-preview.7.23361.9' (x64) [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : .NET location: C:\helix\work\correlation\dotnet-cli\ [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : The following frameworks were found: [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :   8.0.0-preview.5.23280.8 at [C:\helix\work\correlation\dotnet-cli\shared\Microsoft.NETCore.App] [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Learn more: [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : https://aka.ms/dotnet/app-launch-failed [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error :  [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : To install missing framework, download: [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      [] C:\helix\work\workitem\e\dotnet-none\sdk\8.0.100-preview.7.23362.1\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0-preview.7.23361.9&arch=x64&rid=win10-x64 [C:\helix\work\workitem\e\wbt\nonwasm_net6.0_Debug_iyhtgmvj.uu4\nonwasm_net6.0_Debug_iyhtgmvj.uu4.csproj]
      []
```
Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question but seems fine

src/libraries/sendtohelixhelp.proj Show resolved Hide resolved
@lewing
Copy link
Member

lewing commented Jul 12, 2023

related discussion at #88754

@radical
Copy link
Member Author

radical commented Jul 12, 2023

Merging this to get a fix WBT breaking everywhere.

@radical radical merged commit 47bb821 into dotnet:main Jul 12, 2023
50 of 91 checks passed
@radical radical deleted the fix-wbt-dotnet-root branch July 12, 2023 21:11
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono test-enhancement Improvements of test source code
Projects
None yet
2 participants