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][tests] Enable line numbers in stack traces #50893

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

radical
Copy link
Member

@radical radical commented Apr 8, 2021

Library tests don't show line numbers, essentially because the .pdb
files never become available to the WasmAppBuilder .

This is enabled by default for Debug builds only.

To use it with Release builds, add /p:DebuggerSupport=true to the
command line.

With the patch:

  fail: [FAIL] System.Reflection.Tests.MemberInfoTests.HasSameMetadataDefinitionAs__CornerCase_HasElementTypes
  info: Assert.All() Failure: 10 out of 10 items in the collection did not pass.
  info: [9]: Item: System.Double*
  info:      Xunit.Sdk.AllException: Assert.All() Failure: 2 out of 10 items in the collection did not pass.
  info:      [7]: Item: System.Double&
  info:           Xunit.Sdk.TrueException: Assert.True() Failure
  info:           Expected: True
  info:           Actual:   False
  info:              at Xunit.Assert.True(Nullable`1 condition, String userMessage) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\BooleanAsserts.cs:line 95
  info:              at Xunit.Assert.True(Boolean condition) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\BooleanAsserts.cs:line 62
  info:              at System.Reflection.Tests.MemberInfoTests.<>c__DisplayClass31_1.<HasSameMetadataDefinitionAs__CornerCase_HasElementTypes>b__1(Type t2) in /Users/radical/dev/runtime/src/libraries/System.Reflection/tests/MemberInfoTests.cs:line 491
  info:              at Xunit.Assert.All[Type](IEnumerable`1 collection, Action`1 action) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\CollectionAsserts.cs:line 36

@radical radical added arch-wasm WebAssembly architecture area-Build-mono labels Apr 8, 2021
@radical radical requested review from lewing and akoeplinger April 8, 2021 00:47
@ghost
Copy link

ghost commented Apr 8, 2021

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

Issue Details

Library tests don't show line numbers, essentially because the .pdb
files never become available to the WasmAppBuilder .

With the patch:

  fail: [FAIL] System.Reflection.Tests.MemberInfoTests.HasSameMetadataDefinitionAs__CornerCase_HasElementTypes
  info: Assert.All() Failure: 10 out of 10 items in the collection did not pass.
  info: [9]: Item: System.Double*
  info:      Xunit.Sdk.AllException: Assert.All() Failure: 2 out of 10 items in the collection did not pass.
  info:      [7]: Item: System.Double&
  info:           Xunit.Sdk.TrueException: Assert.True() Failure
  info:           Expected: True
  info:           Actual:   False
  info:              at Xunit.Assert.True(Nullable`1 condition, String userMessage) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\BooleanAsserts.cs:line 95
  info:              at Xunit.Assert.True(Boolean condition) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\BooleanAsserts.cs:line 62
  info:              at System.Reflection.Tests.MemberInfoTests.<>c__DisplayClass31_1.<HasSameMetadataDefinitionAs__CornerCase_HasElementTypes>b__1(Type t2) in /Users/radical/dev/runtime/src/libraries/System.Reflection/tests/MemberInfoTests.cs:line 491
  info:              at Xunit.Assert.All[Type](IEnumerable`1 collection, Action`1 action) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\CollectionAsserts.cs:line 36
Author: radical
Assignees: -
Labels:

arch-wasm, area-Build-mono

Milestone: -

@radical radical requested a review from steveisok April 8, 2021 00:48
Library tests don't show line numbers, essentially because the .pdb
files never become available to the WasmAppBuilder .

This is enabled by default for `Debug` builds only.

To use it with `Release` builds, add `/p:DebuggerSupport=true` to the
command line.

With the patch:

```
  fail: [FAIL] System.Reflection.Tests.MemberInfoTests.HasSameMetadataDefinitionAs__CornerCase_HasElementTypes
  info: Assert.All() Failure: 10 out of 10 items in the collection did not pass.
  info: [9]: Item: System.Double*
  info:      Xunit.Sdk.AllException: Assert.All() Failure: 2 out of 10 items in the collection did not pass.
  info:      [7]: Item: System.Double&
  info:           Xunit.Sdk.TrueException: Assert.True() Failure
  info:           Expected: True
  info:           Actual:   False
  info:              at Xunit.Assert.True(Nullable`1 condition, String userMessage) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\BooleanAsserts.cs:line 95
  info:              at Xunit.Assert.True(Boolean condition) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\BooleanAsserts.cs:line 62
  info:              at System.Reflection.Tests.MemberInfoTests.<>c__DisplayClass31_1.<HasSameMetadataDefinitionAs__CornerCase_HasElementTypes>b__1(Type t2) in /Users/radical/dev/runtime/src/libraries/System.Reflection/tests/MemberInfoTests.cs:line 491
  info:              at Xunit.Assert.All[Type](IEnumerable`1 collection, Action`1 action) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\CollectionAsserts.cs:line 36
```
@radical radical force-pushed the wasm-tests-debug-symbols branch from 0d38dc4 to 2245483 Compare April 9, 2021 18:25
@radical radical requested a review from marek-safar as a code owner April 9, 2021 18:25
.. is enabled, which is for WasmDebugLevel != 0
@radical
Copy link
Member Author

radical commented Apr 9, 2021

Last few builds seem to be just stuck!

@radical radical merged commit 8d102e3 into dotnet:main Apr 12, 2021
@radical radical deleted the wasm-tests-debug-symbols branch April 12, 2021 17:01
@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants