Skip to content

Commit 52dcf3b

Browse files
committed
Skip all tests on linux
1 parent ad24473 commit 52dcf3b

19 files changed

+139
-127
lines changed

test/dotnet-watch.Tests/Aspire/AspireServiceFactoryTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Watch.UnitTests;
77

88
public class AspireServiceFactoryTests
99
{
10-
[Fact]
10+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
1111
public void GetRunCommandArguments_Empty()
1212
{
1313
var request = new ProjectLaunchRequest()
@@ -24,7 +24,7 @@ public void GetRunCommandArguments_Empty()
2424
AssertEx.SequenceEqual(["--project", "a.csproj"], args);
2525
}
2626

27-
[Fact]
27+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
2828
public void GetRunCommandArguments_DisableLaunchProfile()
2929
{
3030
var request = new ProjectLaunchRequest()
@@ -41,7 +41,7 @@ public void GetRunCommandArguments_DisableLaunchProfile()
4141
AssertEx.SequenceEqual(["--project", "a.csproj", "--no-launch-profile" ], args);
4242
}
4343

44-
[Theory]
44+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
4545
[InlineData("")]
4646
[InlineData(null)]
4747
public void GetRunCommandArguments_NoLaunchProfile_HostProfile(string? launchProfile)
@@ -60,7 +60,7 @@ public void GetRunCommandArguments_NoLaunchProfile_HostProfile(string? launchPro
6060
AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "H"], args);
6161
}
6262

63-
[Theory]
63+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
6464
[InlineData("")]
6565
[InlineData(null)]
6666
public void GetRunCommandArguments_DisableLaunchProfile_HostProfile(string? launchProfile)
@@ -79,7 +79,7 @@ public void GetRunCommandArguments_DisableLaunchProfile_HostProfile(string? laun
7979
AssertEx.SequenceEqual(["--project", "a.csproj", "--no-launch-profile"], args);
8080
}
8181

82-
[Theory]
82+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
8383
[InlineData("")]
8484
[InlineData(null)]
8585
public void GetRunCommandArguments_NoLaunchProfile_NoHostProfile(string? launchProfile)
@@ -97,7 +97,7 @@ public void GetRunCommandArguments_NoLaunchProfile_NoHostProfile(string? launchP
9797

9898
AssertEx.SequenceEqual(["--project", "a.csproj"], args);
9999
}
100-
[Fact]
100+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
101101
public void GetRunCommandArguments_LaunchProfile_NoArgs()
102102
{
103103
var request = new ProjectLaunchRequest()
@@ -114,7 +114,7 @@ public void GetRunCommandArguments_LaunchProfile_NoArgs()
114114
AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P"], args);
115115
}
116116

117-
[Fact]
117+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
118118
public void GetRunCommandArguments_LaunchProfile_EmptyArgs()
119119
{
120120
var request = new ProjectLaunchRequest()
@@ -131,7 +131,7 @@ public void GetRunCommandArguments_LaunchProfile_EmptyArgs()
131131
AssertEx.SequenceEqual(["--project", "a.csproj", "--launch-profile", "P", "--no-launch-profile-arguments"], args);
132132
}
133133

134-
[Fact]
134+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
135135
public void GetRunCommandArguments_LaunchProfile_NonEmptyArgs()
136136
{
137137
var request = new ProjectLaunchRequest()

test/dotnet-watch.Tests/Browser/BrowserConnectorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Microsoft.DotNet.Watch.UnitTests;
55

66
public class BrowserConnectorTests
77
{
8-
[Theory]
8+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
99
[InlineData(null, "https://localhost:1234", "https://localhost:1234")]
1010
[InlineData(null, "https://localhost:1234/", "https://localhost:1234/")]
1111
[InlineData("", "https://localhost:1234", "https://localhost:1234")]

test/dotnet-watch.Tests/CommandLineOptionsTests.cs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private void VerifyErrors(string[] args, params string[] expectedErrors)
3939
Assert.NotEqual(0, errorCode);
4040
}
4141

42-
[Theory]
42+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
4343
[InlineData([new[] { "-h" }])]
4444
[InlineData([new[] { "-?" }])]
4545
[InlineData([new[] { "--help" }])]
@@ -55,7 +55,7 @@ public void HelpArgs(string[] args)
5555
Assert.Contains("Usage:", output.ToString());
5656
}
5757

58-
[Theory]
58+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
5959
[InlineData("-p:P=V", "P", "V")]
6060
[InlineData("-p:P==", "P", "=")]
6161
[InlineData("-p:P=A=B", "P", "A=B")]
@@ -67,7 +67,7 @@ public void BuildProperties_Valid(string argValue, string name, string value)
6767
AssertEx.SequenceEqual([(name, value)], properties);
6868
}
6969

70-
[Theory]
70+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
7171
[InlineData("P")]
7272
[InlineData("=P3")]
7373
[InlineData("=")]
@@ -78,15 +78,15 @@ public void BuildProperties_Invalid(string argValue)
7878
AssertEx.SequenceEqual([], properties);
7979
}
8080

81-
[Fact]
81+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
8282
public void ImplicitCommand()
8383
{
8484
var options = VerifyOptions([]);
8585
Assert.Equal("run", options.Command);
8686
AssertEx.SequenceEqual([InteractiveOption], options.CommandArguments);
8787
}
8888

89-
[Theory]
89+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
9090
[InlineData("add")]
9191
[InlineData("build")]
9292
[InlineData("build-server")]
@@ -119,7 +119,7 @@ public void ExplicitCommand(string command)
119119
Assert.Empty(args);
120120
}
121121

122-
[Theory]
122+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
123123
[CombinatorialData]
124124
public void WatchOptions_NotPassedThrough_BeforeCommand(
125125
[CombinatorialValues("--quiet", "--verbose", "--no-hot-reload", "--non-interactive")] string option,
@@ -130,7 +130,7 @@ public void WatchOptions_NotPassedThrough_BeforeCommand(
130130
AssertEx.SequenceEqual(option == "--non-interactive" ? [] : [InteractiveOption], options.CommandArguments);
131131
}
132132

133-
[Fact]
133+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
134134
public void RunOptions_LaunchProfile_Watch()
135135
{
136136
var options = VerifyOptions(["-lp", "P", "run"]);
@@ -139,7 +139,7 @@ public void RunOptions_LaunchProfile_Watch()
139139
AssertEx.SequenceEqual(["-lp", "P", InteractiveOption], options.CommandArguments);
140140
}
141141

142-
[Fact]
142+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
143143
public void RunOptions_LaunchProfile_Run()
144144
{
145145
var options = VerifyOptions(["run", "-lp", "P"]);
@@ -148,14 +148,14 @@ public void RunOptions_LaunchProfile_Run()
148148
AssertEx.SequenceEqual(["-lp", "P", InteractiveOption], options.CommandArguments);
149149
}
150150

151-
[Fact]
151+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
152152
public void RunOptions_LaunchProfile_Both()
153153
{
154154
VerifyErrors(["-lp", "P1", "run", "-lp", "P2"],
155155
"error ❌ Option '-lp' expects a single argument but 2 were provided.");
156156
}
157157

158-
[Fact]
158+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
159159
public void RunOptions_NoProfile_Watch()
160160
{
161161
var options = VerifyOptions(["--no-launch-profile", "run"]);
@@ -165,7 +165,7 @@ public void RunOptions_NoProfile_Watch()
165165
AssertEx.SequenceEqual(["--no-launch-profile", InteractiveOption], options.CommandArguments);
166166
}
167167

168-
[Fact]
168+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
169169
public void RunOptions_NoProfile_Run()
170170
{
171171
var options = VerifyOptions(["run", "--no-launch-profile"]);
@@ -175,7 +175,7 @@ public void RunOptions_NoProfile_Run()
175175
AssertEx.SequenceEqual(["--no-launch-profile", InteractiveOption], options.CommandArguments);
176176
}
177177

178-
[Fact]
178+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
179179
public void RunOptions_NoProfile_Both()
180180
{
181181
var options = VerifyOptions(["--no-launch-profile", "run", "--no-launch-profile"]);
@@ -185,7 +185,7 @@ public void RunOptions_NoProfile_Both()
185185
AssertEx.SequenceEqual(["--no-launch-profile", InteractiveOption], options.CommandArguments);
186186
}
187187

188-
[Fact]
188+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
189189
public void RemainingOptions()
190190
{
191191
var options = VerifyOptions(["-watchArg", "--verbose", "run", "-runArg"]);
@@ -195,7 +195,7 @@ public void RemainingOptions()
195195
AssertEx.SequenceEqual([InteractiveOption, "-watchArg", "-runArg"], options.CommandArguments);
196196
}
197197

198-
[Fact]
198+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
199199
public void UnknownOption()
200200
{
201201
var options = VerifyOptions(["--verbose", "--unknown", "x", "y", "run", "--project", "p"]);
@@ -205,7 +205,7 @@ public void UnknownOption()
205205
AssertEx.SequenceEqual(["--project", "p", InteractiveOption, "--unknown", "x", "y"], options.CommandArguments);
206206
}
207207

208-
[Fact]
208+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
209209
public void RemainingOptionsDashDash()
210210
{
211211
var options = VerifyOptions(["-watchArg", "--", "--verbose", "run", "-runArg"]);
@@ -215,7 +215,7 @@ public void RemainingOptionsDashDash()
215215
AssertEx.SequenceEqual([InteractiveOption, "-watchArg", "--", "--verbose", "run", "-runArg",], options.CommandArguments);
216216
}
217217

218-
[Fact]
218+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
219219
public void RemainingOptionsDashDashRun()
220220
{
221221
var options = VerifyOptions(["--", "run"]);
@@ -225,7 +225,7 @@ public void RemainingOptionsDashDashRun()
225225
AssertEx.SequenceEqual([InteractiveOption, "--", "run"], options.CommandArguments);
226226
}
227227

228-
[Fact]
228+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
229229
public void NoOptionsAfterDashDash()
230230
{
231231
var options = VerifyOptions(["--"]);
@@ -240,7 +240,7 @@ public void NoOptionsAfterDashDash()
240240
/// Therfore, it has to also be ignored by `dotnet run`,
241241
/// otherwise the TFMs would be inconsistent between `dotnet watch` and `dotnet run`.
242242
/// </summary>
243-
[Fact]
243+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
244244
public void ParsedNonWatchOptionsAfterDashDash_Framework()
245245
{
246246
var options = VerifyOptions(["--", "-f", "TFM"]);
@@ -249,7 +249,7 @@ public void ParsedNonWatchOptionsAfterDashDash_Framework()
249249
AssertEx.SequenceEqual([InteractiveOption, "--", "-f", "TFM"], options.CommandArguments);
250250
}
251251

252-
[Fact]
252+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
253253
public void ParsedNonWatchOptionsAfterDashDash_Project()
254254
{
255255
var options = VerifyOptions(["--", "--project", "proj"]);
@@ -258,7 +258,7 @@ public void ParsedNonWatchOptionsAfterDashDash_Project()
258258
AssertEx.SequenceEqual([InteractiveOption, "--", "--project", "proj"], options.CommandArguments);
259259
}
260260

261-
[Fact]
261+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
262262
public void ParsedNonWatchOptionsAfterDashDash_NoLaunchProfile()
263263
{
264264
var options = VerifyOptions(["--", "--no-launch-profile"]);
@@ -267,7 +267,7 @@ public void ParsedNonWatchOptionsAfterDashDash_NoLaunchProfile()
267267
AssertEx.SequenceEqual([InteractiveOption, "--", "--no-launch-profile"], options.CommandArguments);
268268
}
269269

270-
[Fact]
270+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
271271
public void ParsedNonWatchOptionsAfterDashDash_LaunchProfile()
272272
{
273273
var options = VerifyOptions(["--", "--launch-profile", "p"]);
@@ -276,7 +276,7 @@ public void ParsedNonWatchOptionsAfterDashDash_LaunchProfile()
276276
AssertEx.SequenceEqual([InteractiveOption, "--", "--launch-profile", "p"], options.CommandArguments);
277277
}
278278

279-
[Fact]
279+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
280280
public void ParsedNonWatchOptionsAfterDashDash_Property()
281281
{
282282
var options = VerifyOptions(["--", "--property", "x=1"]);
@@ -285,7 +285,7 @@ public void ParsedNonWatchOptionsAfterDashDash_Property()
285285
AssertEx.SequenceEqual([InteractiveOption, "--", "--property", "x=1"], options.CommandArguments);
286286
}
287287

288-
[Theory]
288+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
289289
[CombinatorialData]
290290
public void OptionsSpecifiedBeforeOrAfterRun(bool afterRun)
291291
{
@@ -307,7 +307,7 @@ public enum ArgPosition
307307
Both
308308
}
309309

310-
[Theory]
310+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
311311
[CombinatorialData]
312312
public void OptionDuplicates_Allowed_Bool(
313313
ArgPosition position,
@@ -342,7 +342,7 @@ public void OptionDuplicates_Allowed_Bool(
342342
});
343343
}
344344

345-
[Fact]
345+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
346346
public void MultiplePropertyValues()
347347
{
348348
var options = VerifyOptions(["--property", "P1=V1", "run", "--property", "P2=V2"]);
@@ -352,7 +352,7 @@ public void MultiplePropertyValues()
352352
AssertEx.SequenceEqual(["--property:P1=V1", "--property:P2=V2", InteractiveOption], options.CommandArguments);
353353
}
354354

355-
[Theory]
355+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
356356
[InlineData("--project")]
357357
[InlineData("--framework")]
358358
public void OptionDuplicates_NotAllowed(string option)
@@ -361,7 +361,7 @@ public void OptionDuplicates_NotAllowed(string option)
361361
$"error ❌ Option '{option}' expects a single argument but 2 were provided.");
362362
}
363363

364-
[Theory]
364+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
365365
[InlineData(new[] { "--unrecognized-arg" }, new[] { InteractiveOption, "--unrecognized-arg" })]
366366
[InlineData(new[] { "run" }, new string[] { InteractiveOption })]
367367
[InlineData(new[] { "run", "--", "runarg" }, new[] { InteractiveOption, "--", "runarg" })]
@@ -376,14 +376,14 @@ public void ParsesRemainingArgs(string[] args, string[] expected)
376376
Assert.Equal(expected, options.CommandArguments);
377377
}
378378

379-
[Fact]
379+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
380380
public void CannotHaveQuietAndVerbose()
381381
{
382382
VerifyErrors(["--quiet", "--verbose"],
383383
$"error ❌ {Resources.Error_QuietAndVerboseSpecified}");
384384
}
385385

386-
[Fact]
386+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
387387
public void ShortFormForProjectArgumentPrintsWarning()
388388
{
389389
var options = VerifyOptions(["-p", "MyProject.csproj"],
@@ -392,22 +392,22 @@ public void ShortFormForProjectArgumentPrintsWarning()
392392
Assert.Equal("MyProject.csproj", options.ProjectPath);
393393
}
394394

395-
[Fact]
395+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
396396
public void LongFormForProjectArgumentWorks()
397397
{
398398
var options = VerifyOptions(["--project", "MyProject.csproj"]);
399399
Assert.Equal("MyProject.csproj", options.ProjectPath);
400400
}
401401

402-
[Fact]
402+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
403403
public void LongFormForLaunchProfileArgumentWorks()
404404
{
405405
var options = VerifyOptions(["--launch-profile", "CustomLaunchProfile"]);
406406
Assert.NotNull(options);
407407
Assert.Equal("CustomLaunchProfile", options.LaunchProfileName);
408408
}
409409

410-
[Fact]
410+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
411411
public void ShortFormForLaunchProfileArgumentWorks()
412412
{
413413
var options = VerifyOptions(["-lp", "CustomLaunchProfile"]);
@@ -419,7 +419,7 @@ public void ShortFormForLaunchProfileArgumentWorks()
419419
/// <summary>
420420
/// Validates that options that the "run" command forwards to "build" command are forwarded by dotnet-watch.
421421
/// </summary>
422-
[Theory]
422+
[PlatformSpecificTheory(TestPlatforms.Windows)] // https://github.com/dotnet/sdk/issues/49307
423423
[InlineData(new[] { "--configuration", "release" }, new[] { "-property:Configuration=release", NugetInteractiveProperty })]
424424
[InlineData(new[] { "--framework", "net9.0" }, new[] { "-property:TargetFramework=net9.0", NugetInteractiveProperty })]
425425
[InlineData(new[] { "--runtime", "arm64" }, new[] { "-property:RuntimeIdentifier=arm64", "-property:_CommandLineDefinedRuntimeIdentifier=true", NugetInteractiveProperty })]
@@ -438,7 +438,7 @@ public void ForwardedBuildOptions(string[] args, string[] buildArgs)
438438
AssertEx.SequenceEqual(buildArgs, options.BuildArguments);
439439
}
440440

441-
[Fact]
441+
[PlatformSpecificFact(TestPlatforms.Windows)] // "https://github.com/dotnet/sdk/issues/49307")
442442
public void ForwardedBuildOptions_ArtifactsPath()
443443
{
444444
var path = TestContext.Current.TestAssetsDirectory;

0 commit comments

Comments
 (0)