Skip to content

Commit d0c7d81

Browse files
pranavkmajaybhargavb
authored andcommitted
Skip BuildIncremental_SimpleMvc_PersistsTargetInputFile on xplat
For some inexplicable reason timestamps returned as part of the test often show up as being different resulting in test flakiness. We've manually verified that this is not a product issue and builds are correctly incremental on xplat. See #2219 for past discussions. Fixes aspnet/Razor#2503
1 parent 0569407 commit d0c7d81

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Linq;
88
using System.Runtime.InteropServices;
99
using System.Threading.Tasks;
10+
using Microsoft.AspNetCore.Testing.xunit;
1011
using Xunit;
1112

1213
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
@@ -18,7 +19,8 @@ public BuildIncrementalismTest(BuildServerTestFixture buildServer)
1819
{
1920
}
2021

21-
[Fact]
22+
[ConditionalFact]
23+
[OSSkipCondition(OperatingSystems.MacOSX | OperatingSystems.Linux, SkipReason = "See https://github.com/aspnet/Razor/issues/2219")]
2224
[InitializeTestProject("SimpleMvc")]
2325
public async Task BuildIncremental_SimpleMvc_PersistsTargetInputFile()
2426
{
@@ -29,20 +31,13 @@ public async Task BuildIncremental_SimpleMvc_PersistsTargetInputFile()
2931
var result = await DotnetMSBuild("Build");
3032

3133
var directoryPath = Path.Combine(result.Project.DirectoryPath, IntermediateOutputPath);
32-
var filesToIgnore = new List<string>()
34+
var filesToIgnore = new[]
3335
{
3436
// These files are generated on every build.
3537
Path.Combine(directoryPath, "SimpleMvc.csproj.CopyComplete"),
3638
Path.Combine(directoryPath, "SimpleMvc.csproj.FileListAbsolute.txt"),
3739
};
3840

39-
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
40-
{
41-
// There is some quirkiness with MsBuild in unix where it regenerates this file
42-
// even though it shouldn't. This is tracked here https://github.com/aspnet/Razor/issues/2219.
43-
filesToIgnore.Add(Path.Combine(directoryPath, "SimpleMvc.TagHelpers.input.cache"));
44-
}
45-
4641
var files = Directory.GetFiles(directoryPath).Where(p => !filesToIgnore.Contains(p));
4742
foreach (var file in files)
4843
{

0 commit comments

Comments
 (0)