Razor 610 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. commit d0c7d81336c3c5f2914241bbaa8ac764028fc72c
  2. Author: Pranav K <[email protected]>
  3. Date: Fri Jul 27 12:30:03 2018 -0700
  4. Skip BuildIncremental_SimpleMvc_PersistsTargetInputFile on xplat
  5. For some inexplicable reason timestamps returned as part of the test often show up
  6. as being different resulting in test flakiness. We've manually verified that this
  7. is not a product issue and builds are correctly incremental on xplat. See #2219
  8. for past discussions.
  9. Fixes https://github.com/aspnet/Razor/issues/2503
  10. diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs
  11. index f6b4c7ac4e8..4e7bc9f8e50 100644
  12. --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs
  13. +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs
  14. @@ -7,6 +7,7 @@ using System.IO;
  15. using System.Linq;
  16. using System.Runtime.InteropServices;
  17. using System.Threading.Tasks;
  18. +using Microsoft.AspNetCore.Testing.xunit;
  19. using Xunit;
  20. namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
  21. @@ -18,7 +19,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
  22. {
  23. }
  24. - [Fact]
  25. + [ConditionalFact]
  26. + [OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Linux, SkipReason = "See https://github.com/aspnet/Razor/issues/2219")]
  27. [InitializeTestProject("SimpleMvc")]
  28. public async Task BuildIncremental_SimpleMvc_PersistsTargetInputFile()
  29. {
  30. @@ -29,20 +31,13 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
  31. var result = await DotnetMSBuild("Build");
  32. var directoryPath = Path.Combine(result.Project.DirectoryPath, IntermediateOutputPath);
  33. - var filesToIgnore = new List<string>()
  34. + var filesToIgnore = new[]
  35. {
  36. // These files are generated on every build.
  37. Path.Combine(directoryPath, "SimpleMvc.csproj.CopyComplete"),
  38. Path.Combine(directoryPath, "SimpleMvc.csproj.FileListAbsolute.txt"),
  39. };
  40. - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
  41. - {
  42. - // There is some quirkiness with MsBuild in unix where it regenerates this file
  43. - // even though it shouldn't. This is tracked here https://github.com/aspnet/Razor/issues/2219.
  44. - filesToIgnore.Add(Path.Combine(directoryPath, "SimpleMvc.TagHelpers.input.cache"));
  45. - }
  46. -
  47. var files = Directory.GetFiles(directoryPath).Where(p => !filesToIgnore.Contains(p));
  48. foreach (var file in files)
  49. {