diff --git a/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs b/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs
index 5e5c721e9f0d..18387ff5af9b 100644
--- a/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs
+++ b/test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs
@@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Watch.UnitTests;
public class AspireServiceFactoryTests
{
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void GetRunCommandArguments_Empty()
{
var request = new ProjectLaunchRequest()
@@ -24,7 +24,7 @@ public void GetRunCommandArguments_Empty()
AssertEx.SequenceEqual(["--project", "a.csproj"], args);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void GetRunCommandArguments_DisableLaunchProfile()
{
var request = new ProjectLaunchRequest()
@@ -41,7 +41,7 @@ public void GetRunCommandArguments_DisableLaunchProfile()
AssertEx.SequenceEqual(["--project", "a.csproj", "--no-launch-profile" ], args);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("")]
[InlineData(null)]
public void GetRunCommandArguments_NoLaunchProfile_HostProfile(string? launchProfile)
@@ -60,7 +60,7 @@ public void GetRunCommandArguments_NoLaunchProfile_HostProfile(string? launchPro
AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "H"], args);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("")]
[InlineData(null)]
public void GetRunCommandArguments_DisableLaunchProfile_HostProfile(string? launchProfile)
@@ -79,7 +79,7 @@ public void GetRunCommandArguments_DisableLaunchProfile_HostProfile(string? laun
AssertEx.SequenceEqual(["--project", "a.csproj", "--no-launch-profile"], args);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("")]
[InlineData(null)]
public void GetRunCommandArguments_NoLaunchProfile_NoHostProfile(string? launchProfile)
@@ -97,7 +97,7 @@ public void GetRunCommandArguments_NoLaunchProfile_NoHostProfile(string? launchP
AssertEx.SequenceEqual(["--project", "a.csproj"], args);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void GetRunCommandArguments_LaunchProfile_NoArgs()
{
var request = new ProjectLaunchRequest()
@@ -114,7 +114,7 @@ public void GetRunCommandArguments_LaunchProfile_NoArgs()
AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P"], args);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void GetRunCommandArguments_LaunchProfile_EmptyArgs()
{
var request = new ProjectLaunchRequest()
@@ -131,7 +131,7 @@ public void GetRunCommandArguments_LaunchProfile_EmptyArgs()
AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P", "--no-launch-profile-arguments"], args);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void GetRunCommandArguments_LaunchProfile_NonEmptyArgs()
{
var request = new ProjectLaunchRequest()
diff --git a/test/dotnet-watch.Tests/Browser/BrowserConnectorTests.cs b/test/dotnet-watch.Tests/Browser/BrowserConnectorTests.cs
index 6f1a08391dfc..e6a395ae434c 100644
--- a/test/dotnet-watch.Tests/Browser/BrowserConnectorTests.cs
+++ b/test/dotnet-watch.Tests/Browser/BrowserConnectorTests.cs
@@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Watch.UnitTests;
public class BrowserConnectorTests
{
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(null, "https://localhost:1234", "https://localhost:1234")]
[InlineData(null, "https://localhost:1234/", "https://localhost:1234/")]
[InlineData("", "https://localhost:1234", "https://localhost:1234")]
diff --git a/test/dotnet-watch.Tests/CommandLineOptionsTests.cs b/test/dotnet-watch.Tests/CommandLineOptionsTests.cs
index 30d70643855a..00c3223a8792 100644
--- a/test/dotnet-watch.Tests/CommandLineOptionsTests.cs
+++ b/test/dotnet-watch.Tests/CommandLineOptionsTests.cs
@@ -39,7 +39,7 @@ private void VerifyErrors(string[] args, params string[] expectedErrors)
Assert.NotEqual(0, errorCode);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData([new[] { "-h" }])]
[InlineData([new[] { "-?" }])]
[InlineData([new[] { "--help" }])]
@@ -55,7 +55,7 @@ public void HelpArgs(string[] args)
Assert.Contains("Usage:", output.ToString());
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("-p:P=V", "P", "V")]
[InlineData("-p:P==", "P", "=")]
[InlineData("-p:P=A=B", "P", "A=B")]
@@ -67,7 +67,7 @@ public void BuildProperties_Valid(string argValue, string name, string value)
AssertEx.SequenceEqual([(name, value)], properties);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("P")]
[InlineData("=P3")]
[InlineData("=")]
@@ -78,7 +78,7 @@ public void BuildProperties_Invalid(string argValue)
AssertEx.SequenceEqual([], properties);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ImplicitCommand()
{
var options = VerifyOptions([]);
@@ -86,7 +86,7 @@ public void ImplicitCommand()
AssertEx.SequenceEqual([InteractiveOption], options.CommandArguments);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("add")]
[InlineData("build")]
[InlineData("build-server")]
@@ -119,7 +119,7 @@ public void ExplicitCommand(string command)
Assert.Empty(args);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public void WatchOptions_NotPassedThrough_BeforeCommand(
[CombinatorialValues("--quiet", "--verbose", "--no-hot-reload", "--non-interactive")] string option,
@@ -130,7 +130,7 @@ public void WatchOptions_NotPassedThrough_BeforeCommand(
AssertEx.SequenceEqual(option == "--non-interactive" ? [] : [InteractiveOption], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RunOptions_LaunchProfile_Watch()
{
var options = VerifyOptions(["-lp", "P", "run"]);
@@ -139,7 +139,7 @@ public void RunOptions_LaunchProfile_Watch()
AssertEx.SequenceEqual(["-lp", "P", InteractiveOption], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RunOptions_LaunchProfile_Run()
{
var options = VerifyOptions(["run", "-lp", "P"]);
@@ -148,14 +148,14 @@ public void RunOptions_LaunchProfile_Run()
AssertEx.SequenceEqual(["-lp", "P", InteractiveOption], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RunOptions_LaunchProfile_Both()
{
VerifyErrors(["-lp", "P1", "run", "-lp", "P2"],
"error ❌ Option '-lp' expects a single argument but 2 were provided.");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RunOptions_NoProfile_Watch()
{
var options = VerifyOptions(["--no-launch-profile", "run"]);
@@ -165,7 +165,7 @@ public void RunOptions_NoProfile_Watch()
AssertEx.SequenceEqual(["--no-launch-profile", InteractiveOption], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RunOptions_NoProfile_Run()
{
var options = VerifyOptions(["run", "--no-launch-profile"]);
@@ -175,7 +175,7 @@ public void RunOptions_NoProfile_Run()
AssertEx.SequenceEqual(["--no-launch-profile", InteractiveOption], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RunOptions_NoProfile_Both()
{
var options = VerifyOptions(["--no-launch-profile", "run", "--no-launch-profile"]);
@@ -185,7 +185,7 @@ public void RunOptions_NoProfile_Both()
AssertEx.SequenceEqual(["--no-launch-profile", InteractiveOption], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RemainingOptions()
{
var options = VerifyOptions(["-watchArg", "--verbose", "run", "-runArg"]);
@@ -195,7 +195,7 @@ public void RemainingOptions()
AssertEx.SequenceEqual([InteractiveOption, "-watchArg", "-runArg"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void UnknownOption()
{
var options = VerifyOptions(["--verbose", "--unknown", "x", "y", "run", "--project", "p"]);
@@ -205,7 +205,7 @@ public void UnknownOption()
AssertEx.SequenceEqual(["--project", "p", InteractiveOption, "--unknown", "x", "y"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RemainingOptionsDashDash()
{
var options = VerifyOptions(["-watchArg", "--", "--verbose", "run", "-runArg"]);
@@ -215,7 +215,7 @@ public void RemainingOptionsDashDash()
AssertEx.SequenceEqual([InteractiveOption, "-watchArg", "--", "--verbose", "run", "-runArg",], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void RemainingOptionsDashDashRun()
{
var options = VerifyOptions(["--", "run"]);
@@ -225,7 +225,7 @@ public void RemainingOptionsDashDashRun()
AssertEx.SequenceEqual([InteractiveOption, "--", "run"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void NoOptionsAfterDashDash()
{
var options = VerifyOptions(["--"]);
@@ -240,7 +240,7 @@ public void NoOptionsAfterDashDash()
/// Therfore, it has to also be ignored by `dotnet run`,
/// otherwise the TFMs would be inconsistent between `dotnet watch` and `dotnet run`.
///
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ParsedNonWatchOptionsAfterDashDash_Framework()
{
var options = VerifyOptions(["--", "-f", "TFM"]);
@@ -249,7 +249,7 @@ public void ParsedNonWatchOptionsAfterDashDash_Framework()
AssertEx.SequenceEqual([InteractiveOption, "--", "-f", "TFM"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ParsedNonWatchOptionsAfterDashDash_Project()
{
var options = VerifyOptions(["--", "--project", "proj"]);
@@ -258,7 +258,7 @@ public void ParsedNonWatchOptionsAfterDashDash_Project()
AssertEx.SequenceEqual([InteractiveOption, "--", "--project", "proj"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ParsedNonWatchOptionsAfterDashDash_NoLaunchProfile()
{
var options = VerifyOptions(["--", "--no-launch-profile"]);
@@ -267,7 +267,7 @@ public void ParsedNonWatchOptionsAfterDashDash_NoLaunchProfile()
AssertEx.SequenceEqual([InteractiveOption, "--", "--no-launch-profile"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ParsedNonWatchOptionsAfterDashDash_LaunchProfile()
{
var options = VerifyOptions(["--", "--launch-profile", "p"]);
@@ -276,7 +276,7 @@ public void ParsedNonWatchOptionsAfterDashDash_LaunchProfile()
AssertEx.SequenceEqual([InteractiveOption, "--", "--launch-profile", "p"], options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ParsedNonWatchOptionsAfterDashDash_Property()
{
var options = VerifyOptions(["--", "--property", "x=1"]);
@@ -285,7 +285,7 @@ public void ParsedNonWatchOptionsAfterDashDash_Property()
AssertEx.SequenceEqual([InteractiveOption, "--", "--property", "x=1"], options.CommandArguments);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public void OptionsSpecifiedBeforeOrAfterRun(bool afterRun)
{
@@ -307,7 +307,7 @@ public enum ArgPosition
Both
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public void OptionDuplicates_Allowed_Bool(
ArgPosition position,
@@ -342,7 +342,7 @@ public void OptionDuplicates_Allowed_Bool(
});
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void MultiplePropertyValues()
{
var options = VerifyOptions(["--property", "P1=V1", "run", "--property", "P2=V2"]);
@@ -352,7 +352,7 @@ public void MultiplePropertyValues()
AssertEx.SequenceEqual(["--property:P1=V1", "--property:P2=V2", InteractiveOption], options.CommandArguments);
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("--project")]
[InlineData("--framework")]
public void OptionDuplicates_NotAllowed(string option)
@@ -361,7 +361,7 @@ public void OptionDuplicates_NotAllowed(string option)
$"error ❌ Option '{option}' expects a single argument but 2 were provided.");
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(new[] { "--unrecognized-arg" }, new[] { InteractiveOption, "--unrecognized-arg" })]
[InlineData(new[] { "run" }, new string[] { InteractiveOption })]
[InlineData(new[] { "run", "--", "runarg" }, new[] { InteractiveOption, "--", "runarg" })]
@@ -376,14 +376,14 @@ public void ParsesRemainingArgs(string[] args, string[] expected)
Assert.Equal(expected, options.CommandArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void CannotHaveQuietAndVerbose()
{
VerifyErrors(["--quiet", "--verbose"],
$"error ❌ {Resources.Error_QuietAndVerboseSpecified}");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ShortFormForProjectArgumentPrintsWarning()
{
var options = VerifyOptions(["-p", "MyProject.csproj"],
@@ -392,14 +392,14 @@ public void ShortFormForProjectArgumentPrintsWarning()
Assert.Equal("MyProject.csproj", options.ProjectPath);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LongFormForProjectArgumentWorks()
{
var options = VerifyOptions(["--project", "MyProject.csproj"]);
Assert.Equal("MyProject.csproj", options.ProjectPath);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LongFormForLaunchProfileArgumentWorks()
{
var options = VerifyOptions(["--launch-profile", "CustomLaunchProfile"]);
@@ -407,7 +407,7 @@ public void LongFormForLaunchProfileArgumentWorks()
Assert.Equal("CustomLaunchProfile", options.LaunchProfileName);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ShortFormForLaunchProfileArgumentWorks()
{
var options = VerifyOptions(["-lp", "CustomLaunchProfile"]);
@@ -419,7 +419,7 @@ public void ShortFormForLaunchProfileArgumentWorks()
///
/// Validates that options that the "run" command forwards to "build" command are forwarded by dotnet-watch.
///
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(new[] { "--configuration", "release" }, new[] { "-property:Configuration=release", NugetInteractiveProperty })]
[InlineData(new[] { "--framework", "net9.0" }, new[] { "-property:TargetFramework=net9.0", NugetInteractiveProperty })]
[InlineData(new[] { "--runtime", "arm64" }, new[] { "-property:RuntimeIdentifier=arm64", "-property:_CommandLineDefinedRuntimeIdentifier=true", NugetInteractiveProperty })]
@@ -438,7 +438,7 @@ public void ForwardedBuildOptions(string[] args, string[] buildArgs)
AssertEx.SequenceEqual(buildArgs, options.BuildArguments);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void ForwardedBuildOptions_ArtifactsPath()
{
var path = TestContext.Current.TestAssetsDirectory;
diff --git a/test/dotnet-watch.Tests/ConsoleReporterTests.cs b/test/dotnet-watch.Tests/ConsoleReporterTests.cs
index f87855e87799..c9008f820a5a 100644
--- a/test/dotnet-watch.Tests/ConsoleReporterTests.cs
+++ b/test/dotnet-watch.Tests/ConsoleReporterTests.cs
@@ -9,7 +9,7 @@ public class ReporterTests
{
private static readonly string EOL = Environment.NewLine;
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public void WritesToStandardStreams(bool suppressEmojis)
@@ -35,7 +35,7 @@ public void WritesToStandardStreams(bool suppressEmojis)
testConsole.Clear();
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public void WritesToStandardStreamsWithCustomEmojis(bool suppressEmojis)
diff --git a/test/dotnet-watch.Tests/FileSetSerializerTests.cs b/test/dotnet-watch.Tests/FileSetSerializerTests.cs
index 77bd1b8abe68..5b93ab499e36 100644
--- a/test/dotnet-watch.Tests/FileSetSerializerTests.cs
+++ b/test/dotnet-watch.Tests/FileSetSerializerTests.cs
@@ -36,7 +36,7 @@ private static string Serialize(MSBuildFileSetResult fileSetResult, Stream strea
return reader.ReadToEnd();
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task Roundtrip()
{
var result1 = new MSBuildFileSetResult()
@@ -101,7 +101,7 @@ public async Task Roundtrip()
""".Replace("\r\n", "\n"), serialized1.Replace("\r\n", "\n"));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task Task()
{
var dir = _testAssetManager.CreateTestDirectory().Path;
diff --git a/test/dotnet-watch.Tests/FileWatcherTests.cs b/test/dotnet-watch.Tests/FileWatcherTests.cs
index 3918d05d1782..f52bc5e0d49d 100644
--- a/test/dotnet-watch.Tests/FileWatcherTests.cs
+++ b/test/dotnet-watch.Tests/FileWatcherTests.cs
@@ -63,7 +63,7 @@ private async Task TestOperation(
AssertEx.SequenceEqual(expectedChanges, filesChanged.Order(Comparer.Create((x, y) => (x.Path, x.Kind).CompareTo((y.Path, y.Kind)))));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task NewFile(bool usePolling)
@@ -88,7 +88,7 @@ await TestOperation(
() => File.WriteAllText(testFileFullPath, string.Empty));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task NewFileInNewDirectory(bool usePolling)
@@ -119,7 +119,7 @@ await TestOperation(
});
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task ChangeFile(bool usePolling)
@@ -136,7 +136,7 @@ await TestOperation(
() => File.WriteAllText(testFileFullPath, string.Empty));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task MoveFile(bool usePolling)
{
@@ -166,7 +166,7 @@ await TestOperation(
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task FileInSubdirectory()
{
var dir = _testAssetManager.CreateTestDirectory().Path;
@@ -188,7 +188,7 @@ await TestOperation(
() => File.WriteAllText(testFileFullPath, string.Empty));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task NoNotificationIfDisabled(bool usePolling)
@@ -217,7 +217,7 @@ public async Task NoNotificationIfDisabled(bool usePolling)
await Assert.ThrowsAsync(() => changedEv.Task.TimeoutAfter(NegativeTimeout));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task DisposedNoEvents(bool usePolling)
@@ -244,7 +244,7 @@ public async Task DisposedNoEvents(bool usePolling)
await Assert.ThrowsAsync(() => changedEv.Task.TimeoutAfter(NegativeTimeout));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task MultipleFiles(bool usePolling)
@@ -272,7 +272,7 @@ await TestOperation(
() => File.WriteAllText(testFileFullPath, string.Empty));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task MultipleTriggers(bool usePolling)
@@ -332,7 +332,7 @@ private async Task AssertFileChangeRaisesEvent(string directory, IDirectoryWatch
}
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true)]
[InlineData(false)]
public async Task DeleteSubfolder(bool usePolling)
diff --git a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs
index 941194668320..e8ed1cb1c4e9 100644
--- a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs
+++ b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs
@@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Watch.UnitTests
{
public class ApplyDeltaTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger)
{
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task AddSourceFile()
{
Logger.WriteLine("AddSourceFile started");
@@ -42,7 +42,7 @@ public static void Print()
await App.AssertOutputLineStartsWith("Changed!");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ChangeFileInDependency()
{
var testAsset = TestAssets.CopyTestAsset("WatchAppWithProjectDeps")
@@ -67,7 +67,7 @@ public static void Print()
await App.AssertOutputLineStartsWith("Changed!");
}
- [Theory(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task AutoRestartOnRudeEdit(bool nonInteractive)
{
@@ -146,7 +146,7 @@ public async Task AutoRestartOnRudeEditAfterRestartPrompt()
App.AssertOutputContains($"[WatchHotReloadApp ({ToolsetInfo.CurrentTargetFramework})] Launched");
}
- [Theory(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task AutoRestartOnNoEffectEdit(bool nonInteractive)
{
@@ -188,7 +188,7 @@ public async Task AutoRestartOnNoEffectEdit(bool nonInteractive)
///
/// Unchanged project doesn't build. Wait for source change and rebuild.
///
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task BaselineCompilationError()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -215,7 +215,7 @@ public async Task BaselineCompilationError()
/// We currently do not support applying project changes.
/// The workaround is to restart via Ctrl+R.
///
- [Fact(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProjectChangeAndRestart()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -254,7 +254,7 @@ public async Task ProjectChangeAndRestart()
await App.AssertOutputLineStartsWith(">>> System.Linq.Enumerable", failure: _ => false);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ChangeFileInFSharpProject()
{
var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple")
@@ -269,7 +269,7 @@ public async Task ChangeFileInFSharpProject()
await App.AssertOutputLineStartsWith("");
}
- [Fact(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ChangeFileInFSharpProjectWithLoop()
{
var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple")
@@ -339,7 +339,7 @@ public static void Print()
await App.AssertOutputLineStartsWith("Updated types: Printer");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task MetadataUpdateHandler_NoActions()
{
var testAsset = TestAssets.CopyTestAsset("WatchHotReloadApp")
@@ -371,7 +371,7 @@ await App.WaitUntilOutputContains(
$"dotnet watch ⚠ [WatchHotReloadApp ({ToolsetInfo.CurrentTargetFramework})] Expected to find a static method 'ClearCache', 'UpdateApplication' or 'UpdateContent' on type 'AppUpdateHandler, WatchHotReloadApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' but neither exists.");
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task MetadataUpdateHandler_Exception(bool verbose)
{
@@ -480,7 +480,7 @@ public async Task BlazorWasm(bool projectSpecifiesCapabilities)
}
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task BlazorWasm_MSBuildWarning()
{
var testAsset = TestAssets
@@ -524,7 +524,7 @@ public async Task BlazorWasm_Restart()
await App.WaitUntilOutputContains($"dotnet watch ⌚ Reloading browser.");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task Razor_Component_ScopedCssAndStaticAssets()
{
var testAsset = TestAssets.CopyTestAsset("WatchRazorWithDeps")
@@ -650,7 +650,7 @@ public static void Print()
await App.AssertOutputLineStartsWith("Updated types: Printer");
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true, Skip = "https://github.com/dotnet/sdk/issues/43320")]
[InlineData(false)]
public async Task RenameSourceFile(bool useMove)
@@ -702,7 +702,7 @@ public static void PrintFileName([CallerFilePathAttribute] string filePath = nul
await App.AssertOutputLineStartsWith("> Renamed.cs");
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(true, Skip = "https://github.com/dotnet/sdk/issues/43320")]
[InlineData(false)]
public async Task RenameDirectory(bool useMove)
@@ -757,7 +757,7 @@ public static void PrintDirectoryName([CallerFilePathAttribute] string filePath
await App.AssertOutputLineStartsWith("> NewSubdir");
}
- [Fact(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task Aspire()
{
var tfm = ToolsetInfo.CurrentTargetFramework;
diff --git a/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs b/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs
index 9a2429d54f8b..fbcb7eb76e0b 100644
--- a/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs
+++ b/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs
@@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Watch.UnitTests;
public class CompilationHandlerTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger)
{
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ReferenceOutputAssembly_False()
{
var testAsset = TestAssets.CopyTestAsset("WatchAppMultiProc")
diff --git a/test/dotnet-watch.Tests/HotReload/HotReloadDotNetWatcherTests.cs b/test/dotnet-watch.Tests/HotReload/HotReloadDotNetWatcherTests.cs
index ac47a4ef9943..fa9680cb86f5 100644
--- a/test/dotnet-watch.Tests/HotReload/HotReloadDotNetWatcherTests.cs
+++ b/test/dotnet-watch.Tests/HotReload/HotReloadDotNetWatcherTests.cs
@@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Watch.UnitTests;
public class HotReloadDotNetWatcherTests
{
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(new[] { ChangeKind.Update }, new[] { ChangeKind.Update })]
[InlineData(new[] { ChangeKind.Add }, new[] { ChangeKind.Add })]
[InlineData(new[] { ChangeKind.Delete }, new[] { ChangeKind.Delete })]
diff --git a/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs b/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs
index ff666583349d..e39a482fd651 100644
--- a/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs
+++ b/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs
@@ -134,7 +134,7 @@ private RunningWatcher StartWatcher(TestAsset testAsset, string[] args, string w
return new RunningWatcher(this, watcher, watchTask, reporter, console, serviceHolder, shutdownSource);
}
- [Theory(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task UpdateAndRudeEdit(TriggerEvent trigger)
{
@@ -295,7 +295,7 @@ async Task MakeRudeEditChange()
}
}
- [Theory(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task UpdateAppliedToNewProcesses(bool sharedOutput)
{
@@ -485,7 +485,7 @@ public static void Print()
await hasUpdate.WaitAsync(w.ShutdownSource.Token);
}
- [Fact(Skip = "https://github.com/dotnet/sdk/issues/49307")]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task RudeEditInProjectWithoutRunningProcess()
{
var testAsset = CopyTestAsset("WatchAppMultiProc");
diff --git a/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs b/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs
index 509cadb17854..d9f8876e9133 100644
--- a/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs
+++ b/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTests.cs
@@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Watch.UnitTests
{
public class EnvironmentVariablesBuilderTests
{
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void Value()
{
var builder = new EnvironmentVariablesBuilder();
@@ -20,7 +20,7 @@ public void Value()
], env);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void MultipleValues()
{
var builder = new EnvironmentVariablesBuilder();
diff --git a/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs b/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs
index 44b57449f1c3..b0067ebb8124 100644
--- a/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs
+++ b/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs
@@ -16,7 +16,7 @@ public LaunchSettingsProfileTest(ITestOutputHelper output)
_testAssets = new TestAssetsManager(output);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LoadsLaunchProfiles()
{
var project = _testAssets.CreateTestProject(new TestProject("Project1")
@@ -60,7 +60,7 @@ public void LoadsLaunchProfiles()
Assert.NotNull(expected);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void DefaultLaunchProfileWithoutProjectCommand()
{
var project = _testAssets.CreateTestProject(new TestProject("Project1")
diff --git a/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs b/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs
index 84a9f9e5e095..4035ffc7268b 100644
--- a/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs
+++ b/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs
@@ -7,7 +7,7 @@ public class MSBuildEvaluationFilterTest
{
private static readonly EvaluationResult s_emptyEvaluationResult = new(new Dictionary(), projectGraph: null);
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProcessAsync_EvaluatesFileSetIfProjFileChanges()
{
var context = new DotNetWatchContext
@@ -30,7 +30,7 @@ public async Task ProcessAsync_EvaluatesFileSetIfProjFileChanges()
Assert.True(evaluator.RequiresRevaluation);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProcessAsync_DoesNotEvaluateFileSetIfNonProjFileChanges()
{
var context = new DotNetWatchContext
@@ -55,7 +55,7 @@ public async Task ProcessAsync_DoesNotEvaluateFileSetIfNonProjFileChanges()
Assert.Equal(1, counter);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProcessAsync_EvaluateFileSetOnEveryChangeIfOptimizationIsSuppressed()
{
var context = new DotNetWatchContext
@@ -81,7 +81,7 @@ public async Task ProcessAsync_EvaluateFileSetOnEveryChangeIfOptimizationIsSuppr
Assert.Equal(2, counter);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProcessAsync_SetsEvaluationRequired_IfMSBuildFileChanges_ButIsNotChangedFile()
{
// There's a chance that the watcher does not correctly report edits to msbuild files on
diff --git a/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs
index f8a70d48a8ee..1a41d4c6c84c 100644
--- a/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs
+++ b/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs
@@ -19,7 +19,7 @@ private static IEnumerable Inspect(string rootDir, IReadOnlyDictionary entry.Key)
.Select(entry => $"{InspectPath(entry.Key, rootDir)}: [{string.Join(", ", entry.Value.ContainingProjectPaths.Select(p => InspectPath(p, rootDir)))}]");
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task FindsCustomWatchItems()
{
var project = _testAssets.CreateTestProject(new TestProject("Project1")
@@ -51,7 +51,7 @@ public async Task FindsCustomWatchItems()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ExcludesDefaultItemsWithWatchFalseMetadata()
{
var project = _testAssets.CreateTestProject(new TestProject("Project1")
@@ -85,7 +85,7 @@ public async Task ExcludesDefaultItemsWithWatchFalseMetadata()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task SingleTfm()
{
var project = _testAssets.CreateTestProject(new TestProject("Project1")
@@ -118,7 +118,7 @@ public async Task SingleTfm()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task MultiTfm()
{
var project = _testAssets.CreateTestProject(new TestProject("Project1")
@@ -154,7 +154,7 @@ public async Task MultiTfm()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task IncludesContentFiles()
{
var testDir = _testAssets.CreateTestDirectory();
@@ -187,7 +187,7 @@ public async Task IncludesContentFiles()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task IncludesContentFilesFromRCL()
{
var testDir = _testAssets.CreateTestDirectory();
@@ -239,7 +239,7 @@ public async Task IncludesContentFilesFromRCL()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProjectReferences_OneLevel()
{
var project2 = _testAssets.CreateTestProject(new TestProject("Project2")
@@ -268,7 +268,7 @@ public async Task ProjectReferences_OneLevel()
);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task TransitiveProjectReferences_TwoLevels()
{
var project3 = _testAssets.CreateTestProject(new TestProject("Project3")
@@ -307,7 +307,7 @@ public async Task TransitiveProjectReferences_TwoLevels()
Assert.All(result.Files.Values, f => Assert.False(f.IsStaticFile, $"File {f.FilePath} should not be a static file."));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProjectReferences_Graph()
{
// A->B,F,W(Watch=False)
@@ -363,7 +363,7 @@ public async Task ProjectReferences_Graph()
_reporter.Messages.Where(l => l.text.Contains("Collecting watch items from")).Select(l => l.text.Trim()).Order());
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task MsbuildOutput()
{
var project2 = _testAssets.CreateTestProject(new TestProject("Project2")
diff --git a/test/dotnet-watch.Tests/NoRestoreTests.cs b/test/dotnet-watch.Tests/NoRestoreTests.cs
index 55703841c0f0..b858777719cd 100644
--- a/test/dotnet-watch.Tests/NoRestoreTests.cs
+++ b/test/dotnet-watch.Tests/NoRestoreTests.cs
@@ -17,7 +17,7 @@ private static DotNetWatchContext CreateContext(string[] args = null, Environmen
EnvironmentOptions = environmentOptions ?? TestOptions.GetEnvironmentOptions(),
};
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LeavesArgumentsUnchangedOnFirstRun()
{
var context = CreateContext();
@@ -26,7 +26,7 @@ public void LeavesArgumentsUnchangedOnFirstRun()
AssertEx.SequenceEqual(["run", InteractiveFlag], evaluator.GetProcessArguments(iteration: 0));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LeavesArgumentsUnchangedIfMsBuildRevaluationIsRequired()
{
var context = CreateContext();
@@ -39,7 +39,7 @@ public void LeavesArgumentsUnchangedIfMsBuildRevaluationIsRequired()
AssertEx.SequenceEqual(["run", InteractiveFlag], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LeavesArgumentsUnchangedIfOptimizationIsSuppressed()
{
var context = CreateContext([], TestOptions.GetEnvironmentOptions() with { SuppressMSBuildIncrementalism = true });
@@ -49,7 +49,7 @@ public void LeavesArgumentsUnchangedIfOptimizationIsSuppressed()
AssertEx.SequenceEqual(["run", InteractiveFlag], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LeavesArgumentsUnchangedIfNoRestoreAlreadyPresent()
{
var context = CreateContext(["--no-restore"], TestOptions.GetEnvironmentOptions() with { SuppressMSBuildIncrementalism = true });
@@ -59,7 +59,7 @@ public void LeavesArgumentsUnchangedIfNoRestoreAlreadyPresent()
AssertEx.SequenceEqual(["run", "--no-restore", InteractiveFlag], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LeavesArgumentsUnchangedIfNoRestoreAlreadyPresent_UnlessAfterDashDash1()
{
var context = CreateContext(["--", "--no-restore"]);
@@ -69,7 +69,7 @@ public void LeavesArgumentsUnchangedIfNoRestoreAlreadyPresent_UnlessAfterDashDas
AssertEx.SequenceEqual(["run", "--no-restore", InteractiveFlag, "--", "--no-restore"], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void LeavesArgumentsUnchangedIfNoRestoreAlreadyPresent_UnlessAfterDashDash2()
{
var context = CreateContext(["--", "--", "--no-restore"]);
@@ -79,7 +79,7 @@ public void LeavesArgumentsUnchangedIfNoRestoreAlreadyPresent_UnlessAfterDashDas
AssertEx.SequenceEqual(["run", "--no-restore", InteractiveFlag, "--", "--", "--no-restore"], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void AddsNoRestoreSwitch()
{
var context = CreateContext();
@@ -89,7 +89,7 @@ public void AddsNoRestoreSwitch()
AssertEx.SequenceEqual(["run", "--no-restore", InteractiveFlag], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void AddsNoRestoreSwitch_WithAdditionalArguments()
{
var context = CreateContext(["run", "-f", ToolsetInfo.CurrentTargetFramework]);
@@ -99,7 +99,7 @@ public void AddsNoRestoreSwitch_WithAdditionalArguments()
AssertEx.SequenceEqual(["run", "--no-restore", "-f", ToolsetInfo.CurrentTargetFramework, InteractiveFlag], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void AddsNoRestoreSwitch_ForTestCommand()
{
var context = CreateContext(["test", "--filter SomeFilter"]);
@@ -109,7 +109,7 @@ public void AddsNoRestoreSwitch_ForTestCommand()
AssertEx.SequenceEqual(["test", "--no-restore", InteractiveFlag, "--filter SomeFilter"], evaluator.GetProcessArguments(iteration: 1));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public void DoesNotModifyArgumentsForUnknownCommands()
{
var context = CreateContext(["pack"]);
diff --git a/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs b/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs
index 569c2b8d07ac..489e45520b2c 100644
--- a/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs
+++ b/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs
@@ -12,7 +12,7 @@ public BrowserLaunchTests(ITestOutputHelper logger)
{
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task LaunchesBrowserOnStart()
{
var testAsset = TestAssets.CopyTestAsset(AppName)
@@ -30,7 +30,7 @@ public async Task LaunchesBrowserOnStart()
Assert.Contains(App.Process.Output, line => line.Contains("dotnet watch ⌚ Launching browser: https://localhost:5001"));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task UsesBrowserSpecifiedInEnvironment()
{
var testAsset = TestAssets.CopyTestAsset(AppName)
diff --git a/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs b/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs
index 22d227944919..85366609b5a1 100644
--- a/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs
+++ b/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs
@@ -16,7 +16,7 @@ public DotNetWatcherTests(ITestOutputHelper logger)
{
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task RunsWithDotnetWatchEnvVariable()
{
Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_WATCH")), "DOTNET_WATCH cannot be set already when this test is running");
@@ -28,7 +28,7 @@ public async Task RunsWithDotnetWatchEnvVariable()
Assert.Equal("1", await App.AssertOutputLineStartsWith("DOTNET_WATCH = "));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task RunsWithDotnetLaunchProfileEnvVariableWhenNotExplicitlySpecified(bool hotReload)
{
@@ -46,7 +46,7 @@ public async Task RunsWithDotnetLaunchProfileEnvVariableWhenNotExplicitlySpecifi
Assert.Equal("<<>>", await App.AssertOutputLineStartsWith("DOTNET_LAUNCH_PROFILE = "));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task RunsWithDotnetLaunchProfileEnvVariableWhenExplicitlySpecified(bool hotReload)
{
@@ -66,7 +66,7 @@ public async Task RunsWithDotnetLaunchProfileEnvVariableWhenExplicitlySpecified(
Assert.Equal("<<>>", await App.AssertOutputLineStartsWith("DOTNET_LAUNCH_PROFILE = "));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[CombinatorialData]
public async Task RunsWithDotnetLaunchProfileEnvVariableWhenExplicitlySpecifiedButNotPresentIsEmpty(bool hotReload)
{
@@ -84,7 +84,7 @@ public async Task RunsWithDotnetLaunchProfileEnvVariableWhenExplicitlySpecifiedB
Assert.Equal("<<>>", await App.AssertOutputLineStartsWith("DOTNET_LAUNCH_PROFILE = "));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task RunsWithIterationEnvVariable()
{
var testAsset = TestAssets.CopyTestAsset(AppName)
@@ -110,7 +110,7 @@ public async Task RunsWithIterationEnvVariable()
Assert.Equal(2, int.Parse(value, CultureInfo.InvariantCulture));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task Run_WithHotReloadEnabled_ReadsLaunchSettings()
{
var testAsset = TestAssets.CopyTestAsset("WatchAppWithLaunchSettings")
@@ -121,7 +121,7 @@ public async Task Run_WithHotReloadEnabled_ReadsLaunchSettings()
await App.AssertOutputLineEquals("Environment: Development");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task Run_WithHotReloadEnabled_ReadsLaunchSettings_WhenUsingProjectOption()
{
var testAsset = TestAssets.CopyTestAsset("WatchAppWithLaunchSettings")
diff --git a/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs b/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs
index 48ff617568cc..c42007d31818 100644
--- a/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs
+++ b/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs
@@ -103,7 +103,7 @@ public async Task ChangeExcludedFile()
Assert.NotSame(fileChanged, finished);
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ListsFiles()
{
var testAsset = TestAssets.CopyTestAsset(AppName)
diff --git a/test/dotnet-watch.Tests/Watch/ProgramTests.cs b/test/dotnet-watch.Tests/Watch/ProgramTests.cs
index 23660c757461..f6004bb53143 100644
--- a/test/dotnet-watch.Tests/Watch/ProgramTests.cs
+++ b/test/dotnet-watch.Tests/Watch/ProgramTests.cs
@@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Watch.UnitTests
{
public class ProgramTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger)
{
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ConsoleCancelKey()
{
var testAsset = TestAssets.CopyTestAsset("WatchKitchenSink")
@@ -41,7 +41,7 @@ public async Task ConsoleCancelKey()
await shutdownRequested.WaitAsync();
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(new[] { "--no-hot-reload", "run" }, "")]
[InlineData(new[] { "--no-hot-reload", "run", "args" }, "args")]
[InlineData(new[] { "--no-hot-reload", "--", "run", "args" }, "run,args")]
@@ -63,7 +63,7 @@ public async Task Arguments(string[] arguments, string expectedApplicationArgs)
Assert.Equal(expectedApplicationArgs, await App.AssertOutputLineStartsWith("Arguments = "));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData(new[] { "--no-hot-reload", "--", "run", "args" }, "Argument Specified in Props,run,args")]
[InlineData(new[] { "--", "run", "args" }, "Argument Specified in Props,run,args")]
// if arguments specified on command line the ones from launch profile are ignored
@@ -80,7 +80,7 @@ public async Task Arguments_HostArguments(string[] arguments, string expectedApp
AssertEx.Equal(expectedApplicationArgs, await App.AssertOutputLineStartsWith("Arguments = "));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task RunArguments_NoHotReload()
{
var testAsset = TestAssets.CopyTestAsset("WatchHotReloadAppMultiTfm")
@@ -114,7 +114,7 @@ public async Task RunArguments_NoHotReload()
Assert.DoesNotContain(App.Process.Output, l => l.Contains("Working directory:"));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task RunArguments_HotReload()
{
var testAsset = TestAssets.CopyTestAsset("WatchHotReloadAppMultiTfm")
@@ -145,7 +145,7 @@ public async Task RunArguments_HotReload()
Assert.Contains(App.Process.Output, l => l.Contains("Hot reload enabled."));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("P1", "argP1")]
[InlineData("P and Q and \"R\"", "argPQR")]
public async Task ArgumentsFromLaunchSettings_Watch(string profileName, string expectedArgs)
@@ -167,7 +167,7 @@ public async Task ArgumentsFromLaunchSettings_Watch(string profileName, string e
Assert.Contains(App.Process.Output, l => l.Contains("Hot Reload disabled by command line switch."));
}
- [Theory]
+ [PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
[InlineData("P1", "argP1")]
[InlineData("P and Q and \"R\"", "argPQR")]
public async Task ArgumentsFromLaunchSettings_HotReload(string profileName, string expectedArgs)
@@ -187,7 +187,7 @@ public async Task ArgumentsFromLaunchSettings_HotReload(string profileName, stri
Assert.Contains(App.Process.Output, l => l.Contains($"Found named launch profile '{profileName}'."));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task TestCommand()
{
var testAsset = TestAssets.CopyTestAsset("XunitCore")
@@ -212,7 +212,7 @@ public async Task TestCommand()
App.AssertOutputContains(" TestNamespace.VSTestXunitTests.VSTestXunitPassTest2");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task TestCommand_MultiTargeting()
{
var testAsset = TestAssets.CopyTestAsset("XunitMulti")
@@ -224,7 +224,7 @@ public async Task TestCommand_MultiTargeting()
await App.AssertOutputLineEquals(" TestNamespace.VSTestXunitTests.VSTestXunitFailTestNetCoreApp");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task BuildCommand()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -242,7 +242,7 @@ public async Task BuildCommand()
App.AssertOutputContains("warning : The value of property is '123'");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task MSBuildCommand()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -260,7 +260,7 @@ public async Task MSBuildCommand()
App.AssertOutputContains("warning : The value of property is '123'");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task PackCommand()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -280,7 +280,7 @@ public async Task PackCommand()
App.AssertOutputContains($"Successfully created package '{packagePath}'");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task PublishCommand()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -299,7 +299,7 @@ public async Task PublishCommand()
App.AssertOutputContains(Path.Combine("Release", ToolsetInfo.CurrentTargetFramework, "publish"));
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task FormatCommand()
{
var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp")
@@ -317,7 +317,7 @@ public async Task FormatCommand()
App.AssertOutputContains("Format complete in");
}
- [Fact]
+ [PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
public async Task ProjectGraphLoadFailure()
{
var testAsset = TestAssets