Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Lots of unit test failures in Microsoft.AspNet.Razor.Test on CoreCLR on Linux #577

Closed
cesarblum opened this issue Oct 19, 2015 · 8 comments

Comments

@cesarblum
Copy link
Contributor

They all look similar:

info: Exec
info:   program: /usr/bin/env
info:   commandline: bash -c ". \"/home/cesars/src/aspnet/universe/Razor/packages/KoreBuild/build/dnvm.sh\"; dnvm run default -runtime coreclr test"
info:   workingdir: test/Microsoft.AspNet.Razor.Test
xUnit.ne;t DNX Runner (64-bit DNXCore 5.0)
  Discovering: Microsoft.AspNet.Razor.Test
  Discovered:  Microsoft.AspNet.Razor.Test
  Starting:    Microsoft.AspNet.Razor.Test
      Assert.Equal() Failure
                                               ↓ (pos 197)
      Expected: ···lock.cshtml"\r\n\r\n\r\n\r\n#line default\r\n#line hidden\r\n#line 5 "Fun···
      Actual:   ···lock.cshtml"\r\n\r\n\r\n\r\n\r\n#line default\r\n#line hidden\r\n#line 5 "F···
                                               ↑ (pos 197)
      Stack Trace:
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTestInternal(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, Boolean withTabs, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTest(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, TabTest tabTest, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest.CSharpChunkGeneratorCorrectlyGeneratesFunctionsBlocksAtDesignTime()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
      Assert.Equal() Failure
                                              ↓ (pos 756)
      Expected: ···Code.cshtml"\r\n\t \r\n\r\n#line default\r\n#line hidden\r\n\r\n        }\r···
      Actual:   ···Code.cshtml"\r\n\t \r\n\r\n\r\n#line default\r\n#line hidden\r\n\r\n        ···
                                              ↑ (pos 756)
      Stack Trace:
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTestInternal(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, Boolean withTabs, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTest(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, TabTest tabTest, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest.CSharpChunkGeneratorCorrectlyGeneratesDesignTimePragmasForEmptyImplicitExpressionInCodeTabs()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
      Assert.Equal() Failure
                                             ↓ (pos 437)
      Expected: ···\r\n    int i = 1;\r\n\r\n#line default\r\n#line hidden\r\n\r\n          ···
      Actual:   ···\r\n    int i = 1;\r\n\r\n\r\n#line default\r\n#line hidden\r\n\r\n        ···
                                             ↑ (pos 437)
      Stack Trace:
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTestInternal(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, Boolean withTabs, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTest(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, TabTest tabTest, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest.CSharpChunkGeneratorDoesNotRenderLinePragmasIfGenerateLinePragmasIsSetToFalse()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

...

      Assert.Equal() Failure
                                             ↓ (pos 536)
      Expected: ···"\r\nWrite(foo());\r\n\r\n#line default\r\n#line hidden\r\n            ···
      Actual:   ···"\r\nWrite(foo());\r\n\r\n\r\n#line default\r\n#line hidden\r\n          ···
                                             ↑ (pos 536)
      Stack Trace:
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTestInternal(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, Boolean withTabs, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTest(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, TabTest tabTest, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest.CSharpChunkGeneratorCorrectlyGeneratesInheritsAtRuntime()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
      Assert.Equal() Failure
                                               ↓ (pos 197)
      Expected: ···lock.cshtml"\r\n\r\n\r\n\r\n#line default\r\n#line hidden\r\n#line 5 "Fun···
      Actual:   ···lock.cshtml"\r\n\r\n\r\n\r\n\r\n#line default\r\n#line hidden\r\n#line 5 "F···
                                               ↑ (pos 197)
      Stack Trace:
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTestInternal(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, Boolean withTabs, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest`1.RunTest(String name, String baselineName, Boolean generatePragmas, Boolean designTimeMode, IList`1 expectedDesignTimePragmas, TestSpan[] spans, TabTest tabTest, Func`2 hostConfig, Func`2 templateEngineConfig, Action`1 onResults)
           at Microsoft.AspNet.Razor.Test.Generator.RazorCodeGeneratorTest.CSharpChunkGeneratorCorrectlyGeneratesFunctionsBlocksAtDesignTime()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  Finished:    Microsoft.AspNet.Razor.Test
=== TEST EXECUTION SUMMARY ===
   Microsoft.AspNet.Razor.Test  Total: 1850, Errors: 0, Failed: 187, Skipped: 0, Time: 2.573s
@NTaylorMullen
Copy link

This is most likely due to a whole bunch of IsMono checks in the test infrastructure

@dougbu
Copy link
Contributor

dougbu commented Oct 19, 2015

@NTaylorMullen huh? We don't check IsMono anywhere in Razor. All that happens is line ending normalization. These tests are failing because we magically get an extra newline when using DNX Core. Need to debug why but I suspect a CoreFx issue.

@NTaylorMullen
Copy link

Ah, I stand corrected. I thought we did. 👍

@cesarblum
Copy link
Contributor Author

This affects aspnet/Universe#304.

@muratg
Copy link

muratg commented Oct 19, 2015

@dougbu Will you be looking at this one?

cc @Eilon

@dougbu
Copy link
Contributor

dougbu commented Oct 19, 2015

@muratg I'm a bit overloaded but will take a look if @Eilon re-prioritizes my list.

@Eilon Eilon added this to the 4.0.0-rc1 milestone Oct 19, 2015
@Eilon
Copy link
Contributor

Eilon commented Oct 19, 2015

Giving to @pranavkm

@Eilon Eilon modified the milestones: 4.0.0-rc1, 4.0.0-rc2 Oct 22, 2015
dougbu added a commit that referenced this issue Nov 17, 2015
- Mono beta is now 4.2.1 which doesn't work with `nuget.exe`
- see also aspnet/External#48

note: cannot use `KOREBUILD_TEST_DNXCORE=true` due to #577
dougbu added a commit that referenced this issue Nov 17, 2015
- upgrade Linux to Trusty (Ubuntu 14.04) distribution, where .NET Core is supported
- Mono beta is now 4.2.1 which doesn't work with `nuget.exe`
  - see also aspnet/External#48

Note: cannot use `KOREBUILD_TEST_DNXCORE=true` due to #577
dougbu added a commit that referenced this issue Nov 17, 2015
- upgrade Linux to Trusty (Ubuntu 14.04) distribution, where .NET Core is supported
- Mono beta is now 4.2.1 which doesn't work with `nuget.exe`
  - see also aspnet/External#48

Note: cannot use `KOREBUILD_TEST_DNXCORE=true` due to #577
pranavkm added a commit that referenced this issue Nov 19, 2015
@pranavkm
Copy link
Contributor

@Eilon this is done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants