Skip to content

Commit 97b050c

Browse files
committed
Fix issue with tests
1 parent 9fc9636 commit 97b050c

File tree

5 files changed

+40
-31
lines changed

5 files changed

+40
-31
lines changed

Rewrite/tests/Rewrite.CSharp.Tests/Rewrite.CSharp.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.6.3" />
22+
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.8.4" />
2323
<PackageReference Include="Nuke.Utilities.IO.Globbing" Version="9.0.4" />
2424
<PackageReference Include="Spectre.Console" Version="0.50.0" />
2525
<PackageReference Include="TUnit" Version="0.56.50" />

Rewrite/tests/Rewrite.MSBuild.Tests/RecipeManagerTests.cs

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public class RecipeManagerTests : BaseTests
5858
// }
5959
// }
6060
//
61+
#if NET9_0_OR_GREATER
6162
[Test]
6263
public async Task InstallRecipe(CancellationToken cancellationToken)
6364
{
@@ -96,7 +97,7 @@ public class Foo;
9697
var afterLst = visitor.Visit(lst, executionContext);
9798
afterLst!.ToString().ShouldBeSameAs($"/*~~(!!--->)~~>*/{lst}");
9899
}
99-
100+
#endif
100101

101102
/// <summary>
102103
/// Verifies that we can act on multiple solutions via one invocation of the command
@@ -121,28 +122,28 @@ public async Task<VerifyResult> RoslynRecipeBatchWithTwoSolution()
121122
return await VerifyDirectory(directory, IncludeTestFile);
122123
}
123124

124-
125-
/// <summary>
126-
/// Verifies that we can act on multiple solutions via one invocation of the command
127-
/// </summary>
128-
[Test]
129-
public async Task MorganStanley()
130-
{
131-
// var directory = CreateRecipeInputDirectory(FixturesDir / "TwoSolutions");
132-
var directory = (AbsolutePath)"C:\\Projects\\morganstanley\\ComposeUI";
133-
var settings = new RunRecipeCommand.Settings
134-
{
135-
// Ids = [
136-
// "CA1861", // Avoid constant arrays as arguments,
137-
// "CA1311" // Specify a culture or use an invariant version
138-
// ],
139-
Packages = ["Microsoft.CodeAnalysis.NetAnalyzers"],
140-
Path = directory
141-
};
142-
var command = CreateObject<RunRecipeCommand>();
143-
await command.ExecuteAsync(settings);
144-
145-
// return await VerifyDirectory(directory, IncludeTestFile);
146-
}
125+
//
126+
// /// <summary>
127+
// /// Verifies that we can act on multiple solutions via one invocation of the command
128+
// /// </summary>
129+
// [Test]
130+
// public async Task MorganStanley()
131+
// {
132+
// // var directory = CreateRecipeInputDirectory(FixturesDir / "TwoSolutions");
133+
// var directory = (AbsolutePath)"C:\\Projects\\morganstanley\\ComposeUI";
134+
// var settings = new RunRecipeCommand.Settings
135+
// {
136+
// // Ids = [
137+
// // "CA1861", // Avoid constant arrays as arguments,
138+
// // "CA1311" // Specify a culture or use an invariant version
139+
// // ],
140+
// Packages = ["Microsoft.CodeAnalysis.NetAnalyzers"],
141+
// Path = directory
142+
// };
143+
// var command = CreateObject<RunRecipeCommand>();
144+
// await command.ExecuteAsync(settings);
145+
//
146+
// // return await VerifyDirectory(directory, IncludeTestFile);
147+
// }
147148

148149
}

Rewrite/tests/Rewrite.MSBuild.Tests/Rewrite.MSBuild.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="Nuke.Tooling" Version="9.0.4" />
2424
<PackageReference Include="Spectre.Console" Version="0.50.0" />
2525
<PackageReference Include="TUnit" Version="0.56.50" />
26-
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.6.3" />
26+
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.8.4" />
2727
<PackageReference Include="coverlet.collector" Version="6.0.4">
2828
<PrivateAssets>all</PrivateAssets>
2929
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Rewrite/tests/Rewrite.Recipes.Tests/Rewrite.Recipes.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<PackageReference Include="Serilog" Version="4.2.0" />
1313
<PackageReference Include="TUnit" Version="0.56.50" />
14-
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.6.3" />
14+
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.8.4" />
1515
<PackageReference Include="coverlet.collector" Version="6.0.4">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

_build/Build.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,23 +261,31 @@ grep dotnet |
261261
{
262262
DotNetTest(x => x
263263
.SetResultsDirectory(TestResultsDirectory)
264-
.CombineWith([Solution.tests.Rewrite_Recipes_Tests, Solution.tests.Rewrite_CSharp_Tests, Solution.tests.Rewrite_MSBuild_Tests], (c,v) => c
264+
.CombineWith([
265+
Solution.tests.Rewrite_Recipes_Tests,
266+
Solution.tests.Rewrite_CSharp_Tests,
267+
Solution.tests.Rewrite_MSBuild_Tests,
268+
], (c,v) => c
265269
.SetProjectFile(v)
270+
// .SetVerbosity(DotNetVerbosity.normal)
271+
// .SetLoggers("console;verbosity=quiet")
266272
.AddProcessAdditionalArguments("--",
267273
"--test-parameter RenderLST=false",
268274
"--test-parameter NoAnsi=true",
269275
"--no-progress",
270276
"--no-ansi",
271277
"--disable-logo",
272278
"--report-trx",
273-
"--output Detailed",
274-
"--hide-test-output",
279+
// "--output Detailed",
280+
// "--hide-test-output",
281+
// "--help",
282+
"--verbosity minimal",
275283
$"--report-trx-filename {v.Name}.trx",
276284
"--results-directory", TestResultsDirectory
277285
)
278286
)
279287
);
280-
InjectLogsIntoTrx();
288+
// InjectLogsIntoTrx();
281289
});
282290

283291

0 commit comments

Comments
 (0)